Skip to content

Read In and Output Postscript file

4 messages · Brad Holmes, Tony Plate, Marc Schwartz +1 more

#
Hi,

I am only a few months old at R and I have encountered an interesting 
issue.

Would it be possible to read in a pre-existing postscript file, and 
output it "as is" through R?

I have five plots, and I am placing them in a layout that is 2 X 3. I 
was hoping to "insert" the pre-existing postscript file made from 
Molscript in the last spot.

Thanks for your time!

~Brad Holmes
Research Assistant
Texas A&M University
#
One way to approach this from within R would be to use gs to convert the 
preexisting postscript file to some sort of bitmap, and then read that into 
R and plot it.

Another way to do this, outside of R, would be to use the capabilities of 
gs to combine multiple ps files (for example, I often generate multiple 
single-page postscript files, and then use gs to wrap them up in a pdf).

hope this helps,

Tony Plate
At Wednesday 02:19 PM 1/28/2004 -0600, Brad Holmes wrote:
Tony Plate   tplate at acm.org
#
On Wed, 2004-01-28 at 14:19, Brad Holmes wrote:
If the final goal is a single PS file with all 6 graphics in a 2 x 3
matrix, your best bet might be to generate the five R graphics
separately as PS or EPS files. Then import each of the six PS/EPS files
into a document layout program.

Your e-mail header suggests that you are on a Mac. If you have access to
MS Word or an alternate document processing program like OpenOffice or a
functional equivalent, you can import EPS files into a table, with each
graphic going into a cell in the table. You can then "print" the
document to a PS file, using a PS printer driver.

Others may have alternate ideas.

HTH,

Marc Schwartz
#
On Wed, Jan 28, 2004 at 05:31:11PM -0600, Marc Schwartz wrote:
Yes: I'd recommend Illustrator rather than Word/OOo for this. 

But actually, the original question got me curious. How difficult would
it be to add EPS import to the postscript device? Other devices could
just ignore it or simply read the bounding box and insert the usual
empty box which says "EPS file". I guess I'll go for a litte walk in the
source code when I have a little spare time to burn. ;-)

I mean - this could be really usefull: Finally R would be capable of
producing the wealth of chartjunk other software has offered for
decades! Imagine using your corporate logo instead of boring circles or
dots for plotting! (OK ok - ouch - don't beat me, please...) ;-)


cu
	Philipp