[R] how to automatically set plot limits and plot scale?

amorphia ben.kenward at gmail.com
Wed Sep 30 14:27:08 CEST 2009


Hi all,

I have two related questions about plot limits and plot sizes. R can
automatically fit plot limits to your data if you plot the data in the first
plot command. But if you add to the plot later (e.g. by drawing lines, as I
must do), the original limits are not recalculated, even if you plot outside
what is displayed. Is there a way to get R to automatically change the
limits to fit everthing in?

I can live with not being able to solve that problem because I don't need to
make so many plots that I can't manually set the limits. My next problem is
more challenging to solve manually. I would like my plots, when I send them
to postscript, to all have the same scale (number of units per cm on page
should be the same). So if the plot limits are set to encompass more, the
graph should be output as bigger.

It doesn't seem completely straightforward to do this manually by setting
the postscript width and height, because that doesn't take into account that
there are margins, etcetera. Is there a way to solve this?

Thanks very much for any help!

Ben
-- 
View this message in context: http://www.nabble.com/how-to-automatically-set-plot-limits-and-plot-scale--tp25680059p25680059.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list