Re: [R] Lattice equivalent of par(mfrow = )
Dear R-helpers, On Jan 12, 2008, at 5:17 PM, Deepayan Sarkar wrote: On 1/12/08, Michael Kubovy [EMAIL PROTECTED] wrote: Dear r-helpers, Does anyone have a straightforward example of putting together three unrelated (expect for a common y-axis) xyplot() figures in what would be in base graphics a par(mfrow = c(1, 3)) arrangement? See the examples in ?print.trellis. Thanks. Now how do I insure that the three y-axes are the same scale in the following? states - data.frame(state.x77, state.name = dimnames(state.x77)[[1]], state.region = state.region) plot1 - xyplot(Murder ~ Population, data = states, xlab = grid::textGrob(expression(frac(abs(bold(c)), abs(bold(b, gp=gpar(fontsize=25)), ylab = grid::textGrob(expression(paste(log, frac(italic(p) (italic(c)), italic(p)(italic(b), gp = gpar(fontsize = 25)), ) plot2 - xyplot(Murder ~ Population, data = states, xlab = grid::textGrob(expression(gamma), gp = gpar(fontsize= 25)), ylab = '', ) plot3 - xyplot(Murder ~ Population, data = states, xlab = grid::textGrob(expression(frac(abs( bold(c) ),abs( bold(b) ))), gp = gpar(fontsize = 25)), ylab = '', ) print(plot1, position = c(0.0, 0, 0.33, 1), more = TRUE) print(plot2, position = c(0.33, 0, 0.67, 1), more = TRUE) print(plot3, position = c(0.67, 0, 1, 1)) _ Professor Michael Kubovy University of Virginia Department of Psychology USPS: P.O.Box 400400Charlottesville, VA 22904-4400 Parcels:Room 102Gilmer Hall McCormick RoadCharlottesville, VA 22903 Office:B011+1-434-982-4729 Lab:B019+1-434-982-4751 Fax:+1-434-982-4766 WWW:http://www.people.virginia.edu/~mk9y/ __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Lattice equivalent of par(mfrow = )
You need to make sure all your xlab's are the same size. Try: states - data.frame(state.x77, state.name = dimnames(state.x77)[[1]], state.region = state.region) plot1 - xyplot(Murder ~ Population, data = states, xlab = grid::textGrob(expression(frac(abs(bold(c)), abs(bold(b, gp=gpar(fontsize=25)), ylab = grid::textGrob(expression(paste(log, frac(italic(p) (italic(c)), italic(p)(italic(b), gp = gpar(fontsize = 25)), ) plot2 - xyplot(Murder ~ Population, data = states, xlab = grid::textGrob(expression(atop(gamma,)), gp = gpar(fontsize= 25)), ylab = '', ) plot3 - xyplot(Murder ~ Population, data = states, xlab = grid::textGrob(expression(frac(abs( bold(c) ),abs( bold(b) ))), gp = gpar(fontsize = 25)), ylab = '', ) print(plot1, position = c(0.0, 0, 0.33, 1), more = TRUE) print(plot2, position = c(0.33, 0, 0.67, 1), more = TRUE) print(plot3, position = c(0.67, 0, 1, 1)) On Jan 13, 2008 7:40 AM, Michael Kubovy [EMAIL PROTECTED] wrote: Dear R-helpers, On Jan 12, 2008, at 5:17 PM, Deepayan Sarkar wrote: On 1/12/08, Michael Kubovy [EMAIL PROTECTED] wrote: Dear r-helpers, Does anyone have a straightforward example of putting together three unrelated (expect for a common y-axis) xyplot() figures in what would be in base graphics a par(mfrow = c(1, 3)) arrangement? See the examples in ?print.trellis. Thanks. Now how do I insure that the three y-axes are the same scale in the following? states - data.frame(state.x77, state.name = dimnames(state.x77)[[1]], state.region = state.region) plot1 - xyplot(Murder ~ Population, data = states, xlab = grid::textGrob(expression(frac(abs(bold(c)), abs(bold(b, gp=gpar(fontsize=25)), ylab = grid::textGrob(expression(paste(log, frac(italic(p) (italic(c)), italic(p)(italic(b), gp = gpar(fontsize = 25)), ) plot2 - xyplot(Murder ~ Population, data = states, xlab = grid::textGrob(expression(gamma), gp = gpar(fontsize= 25)), ylab = '', ) plot3 - xyplot(Murder ~ Population, data = states, xlab = grid::textGrob(expression(frac(abs( bold(c) ),abs( bold(b) ))), gp = gpar(fontsize = 25)), ylab = '', ) print(plot1, position = c(0.0, 0, 0.33, 1), more = TRUE) print(plot2, position = c(0.33, 0, 0.67, 1), more = TRUE) print(plot3, position = c(0.67, 0, 1, 1)) _ Professor Michael Kubovy University of Virginia Department of Psychology USPS: P.O.Box 400400Charlottesville, VA 22904-4400 Parcels:Room 102Gilmer Hall McCormick RoadCharlottesville, VA 22903 Office:B011+1-434-982-4729 Lab:B019+1-434-982-4751 Fax:+1-434-982-4766 WWW:http://www.people.virginia.edu/~mk9y/ __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem you are trying to solve? __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Lattice equivalent of par(mfrow = )
Dear r-helpers, Does anyone have a straightforward example of putting together three unrelated (expect for a common y-axis) xyplot() figures in what would be in base graphics a par(mfrow = c(1, 3)) arrangement? _ Professor Michael Kubovy University of Virginia Department of Psychology USPS: P.O.Box 400400Charlottesville, VA 22904-4400 Parcels:Room 102Gilmer Hall McCormick RoadCharlottesville, VA 22903 Office:B011+1-434-982-4729 Lab:B019+1-434-982-4751 Fax:+1-434-982-4766 WWW:http://www.people.virginia.edu/~mk9y/ __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Lattice equivalent of par(mfrow = )
Check out: https://stat.ethz.ch/pipermail/r-devel/2005-June/033508.html On Jan 12, 2008 4:46 PM, Michael Kubovy [EMAIL PROTECTED] wrote: Dear r-helpers, Does anyone have a straightforward example of putting together three unrelated (expect for a common y-axis) xyplot() figures in what would be in base graphics a par(mfrow = c(1, 3)) arrangement? __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Lattice equivalent of par(mfrow = )
On 1/12/08, Michael Kubovy [EMAIL PROTECTED] wrote: Dear r-helpers, Does anyone have a straightforward example of putting together three unrelated (expect for a common y-axis) xyplot() figures in what would be in base graphics a par(mfrow = c(1, 3)) arrangement? See the examples in ?print.trellis. -Deepayan __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.