Control the number of panels in the grid graph with R

How to limit the number of panels displayed on one page using a grid? I draw the regression results for several states, and 50 of them on one page make them unreadable. I would like to limit the output to 4 wide and maximally high.

Here is my lattice code:

xyplot(Predicted_value + Actual_value ~ x_value | State_CD, data=dd)

There are 50 different values ​​for State_CD

+5
source share
1 answer

Look at the parameter layout.

Maybe you need something like:

xyplot(Predicted_value + Actual_value ~ x_value | State_CD, data=dd, layout = c(4,5))
+5
source

All Articles