tags:

views:

265

answers:

1

How do I limit the number of panels shown on a single page using lattice? I am graphing the results of a regression for multiple states and putting 50 of these on a single page makes them unreadable. I would like to limit the output to 4 wide and as many tall as needed.

Here's my lattice code:

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

There are 50 different values for State_CD

+4  A: 

Have a look at the layout parameter.

Maybe you want something like:

xyplot(Predicted_value + Actual_value ~ x_value | State_CD, data=dd, layout = c(4,5))
hadley
Bingo. I was hoping it was something easy like that. I kept browsing through Sarkar's book and just couldn't find it.
JD Long