Monday, 15 December 2014

Blank Plots & Graphic Devices

To create blank plots, there are few options:

from 'base' package:

plot.new()

frame()

plot(1,type="n",axes=FALSE,xlab="",ylab="")



blank plots without margins

par(mar=rep(0,4)) 
plot(1,type="n",axes=FALSE,xlab="",ylab="")



using 'lattice' package:

xyplot(1~1,col="transparent",scales=list(draw=FALSE),xlab="",ylab="",par.settings=list(axis.line=list(col=0)))


To open graphic device:

x11()       #for linux, but also works for other OS if installed  

windows()     #for windows  

quartz()      #for Mac 

No comments:

Post a Comment