Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about setting different ylim for different panels #15

Open
sn248 opened this issue Apr 23, 2020 · 0 comments
Open

Question about setting different ylim for different panels #15

sn248 opened this issue Apr 23, 2020 · 0 comments

Comments

@sn248
Copy link

sn248 commented Apr 23, 2020

I am trying to set different ylim for the 2 panels in my xpose.VPC plot. Reading through the documentation of xyplot in lattice, I was thinking something like

scales = list(y = list(relation = "free")),
ylim = list(c(0,600),c(0,300)),

should work, but the limits for both the panels are set to (0,600). I also get the following warning

Warning messages:
1: In limitlist[id] <- lim :
  number of items to replace is not a multiple of replacement length
2: In limitlist[id] <- lim :
  number of items to replace is not a multiple of replacement length

Any help in how to set different ylim for different panels would be very much appreciated!

A similar setting in xyplot from lattice seems to be working and gives me different y-limits, e.g., the following works

library(lattice)
temp.cut <- equal.count(environmental$temperature, 2)
xyplot(ozone ~ radiation | temp.cut, data = environmental,
       scales = list(y = list(relation = "free",
                              limits = list(c(0,150),c(0,100)))))

Thank you!
SN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant