[R] How to store histogram plots
Ott Toomet
otoomet at econ.dk
Mon Mar 10 09:46:35 CET 2003
Dear Hong,
Why do you want to save the histogram on the disk? Is it not enough
just to draw them one-by-one and read in only the data necessary for
the current one?
However, you may consider:
1) look what the hist() returns. In particular, it has $counts
component which you may use in order to draw a pre-calculated
histogram later (using barplot()). Now save the returned list
either in a list or to the disk (using save()). Later plot all the
histograms. In fact, here you are not limited with different
histograms on different panels, you may e.g. put color-coded bars
from different histograms on the same plot, fit a surface
etc. This is the flexible way.
2) Divide the graphic screen (e.g. using par(mfrow)), read the
datasets one-by-one and plot corresponding histograms. This is a
simpler way.
Regards,
Ott
| From: "hongqin" <hongqin at uchicago.edu>
| Date: Sat, 8 Mar 2003 11:01:20 -0600
|
| Hello all,
|
| Is there any way to save histogram results to a file and then read it
| back later? I am dealing with several sets of data that are too large to
| be loaded in the same R process, but I want to plot their histogram side
| by side for comparison. I am also considering how to use the 'wireframe'
| function to plot these histograms in the same figure. Any suggestions
| will be greatly appreciated.
|
| Thanks,
|
| Hong
More information about the R-help
mailing list