Learn R Programming

RPMG (version 2.2-7)

jpostscript: Postscript Output

Description

Get file name and recreate plot on a postsctipt device. This program makes an attempt to keep the same size plot as viewed in the screen.

Usage

jpostscript(file=NULL, P=NULL, w=NULL, h=NULL)

Value

Graphical Side Effect

Arguments

file

Postscript file name, eps will be added as a suffix

P

vector to fix the size, c(width, height)

w

width, inches

h

height, inches

Author

Jonathan M. Lees<jonathan.lees.edu>

Details

If P=c(10,12) is missing or NULL, program will attempt to use current plotting region via par to duplicated the size of the postscript device. Must close this device with dev.off() to finish. If either w or h are provided they will override the values in vector P.

See Also

par, postscript, device

Examples

Run this code

if (FALSE) {
jjj = local.file('hi', 'eps')
x= rnorm(10)
y= rnorm(10)

plot(x,y)

print('resize the current plot')

jpostscript(jjj)
plot(x,y)
dev.off()

jpostscript("HiThere", P=c(7,7) )
plot(x,y)
dev.off()


jpostscript("HiThere", P=c(7,7), w=10 )
plot(x,y)
dev.off()

}


Run the code above in your browser using DataLab