Hi,

I'm trying to make multiple plots in a same graph window in R. 

The multiple graphs are showing up in the right positions on the window, but I'm having the problem that the graphic window is being refreshed every time a new plot is drawn, so that I end up with only the last graph coming up; the previous ones are all erased

If I try to print in a .eps file directly, then I end up with the first plot only, in the right position of the page, and the others are not plotted at all. 

The script I wrote is the following:

X11()

par(fig=c(0., 0.55, 0.45, 1.), cex=0.8)
plot(ldtime, dx[which(dphotons$energy<0.3, arr.ind=T)], type="l", main="", xlab="seconds", ylab="cell density", xlim=c(min(hdtime), max(ldtime)))

dev.set(dev.cur())
par(fig=c(0., 0.55, 0., 0.55),cex=0.8)
plot(hdtime, dx[which(dphotons$energy>0.5, arr.ind=T)], type="l", xlab="seconds", ylab="cell density", xlim=c(min(hdtime), max(ldtime)))

dev.set(dev.cur())
par(fig=c(0.5, 1., 0., 1.), cex=0.8)
plot(x, cumsum(Pl)/max(cumsum(Pl)), type="l", main="", xlab="", ylab="profile cumulative probability", xlim=c(min(hdtime), max(ldtime)))
points(x, cumsum(Ph)/max(cumsum(Ph)), type="l", col=gray(0.5))


Can someone please point me what I'm doing wrong?

thanks,
ulisses.


	[[alternative HTML version deleted]]


