I’ve only been using R for about 2 weeks, so I’m probably missing something basic.
In summary, I’ve written a program that creates 2 X 2 histogram grids that gets refreshed using a readline statment (I’m going through a loop of 100s of histograms.)
The plot (grid) looks as follows:
————
| h1 | h2 |
————
| h3 | h4 |
————
Instead of having 4 histograms to a page, I would like to only plot two histograms, while using the “saved” boxes to print information about each histogram.
For example: I would keep box h1 as a histogram and box h2 would provide details about h1 (mean, std dev, correlated data, and a variety of statistics).
Box h3 would also be a histogram and box h4 would provide summary statistics for h3.
So basically, I need some R output structure that would allow me to plot two histograms at a time with blocks of open space for each histogram where I can provide extensive details.
There is fair amount of data to be displayed for each plot that doesn’t belong in the plot, so what alternatives are there for displaying the data in conjunction with the plot?
If this not the correct forum, then my apologies and please just point me in the right direction.
The
textplotfunction in thegplotspackage and theaddtable2plotfunction in theplotrixpackage both can be used to put text/output into a plot (use one or the other, not both). You can use theplot.newfunction to move to the next frame so that the text is plotted in the next frame rather than on top of the histogram. You could also just leave more room and add the information on the same plot. You might also want to look at thelayoutfunction for a way to make the size of the figure regions different.