I have issued the following command to a ggplot figure:
facet_wrap(~variable,scales="free")
but I also want for the x and y scales to be equal for each panel (while the limits vary from panel to panel). Is this possible in ggplot2?
If you use facet_grid, you can specify space='free'. I think this is what you want.
require(ggplot2)
x = 1:9
group = rep(1:3, each=3)
data = data.frame(x, group)
qplot(x, x, data=data) + facet_grid(~group, scales='free', space='free')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With