Michael A. Miller
2003-Jan-15 16:43 UTC
[R] [lattice] lines for stripplot (like dotplot) or jitter for dotplot?
I'd like to use stripplot for some plots because I want to use the jitter parameter. On the other hand, I'd like to use dotplot because I'd like to have the horizontal lines that it includes. dotplot doesn't have a jitter option and I'm not having any success with getting panel.grid(h=-1) with stripplot. Can anyone show me how to make dotplot-like lines on a stripplot? Or how to jitter the vertical plotting position on a dotplot? Thanks, Mike -- Michael A. Miller mmiller3 at iupui.edu Imaging Sciences, Department of Radiology, IU School of Medicine
Wiener, Matthew
2003-Jan-15 16:49 UTC
[R] [lattice] lines for stripplot (like dotplot) or jitter for dotplot?
You could jitter your data manually using jitter() (part of the base package) and then use dotplot. Hope this helps, Matt Wiener -----Original Message----- From: mmiller3 at iupui.edu [mailto:mmiller3 at iupui.edu] Sent: Wednesday, January 15, 2003 10:41 AM To: r-help at stat.math.ethz.ch Subject: [R] [lattice] lines for stripplot (like dotplot) or jitter for dotplot? I'd like to use stripplot for some plots because I want to use the jitter parameter. On the other hand, I'd like to use dotplot because I'd like to have the horizontal lines that it includes. dotplot doesn't have a jitter option and I'm not having any success with getting panel.grid(h=-1) with stripplot. Can anyone show me how to make dotplot-like lines on a stripplot? Or how to jitter the vertical plotting position on a dotplot? Thanks, Mike -- Michael A. Miller mmiller3 at iupui.edu Imaging Sciences, Department of Radiology, IU School of Medicine ______________________________________________ R-help at stat.math.ethz.ch mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help ------------------------------------------------------------------------------
Deepayan Sarkar
2003-Jan-15 20:01 UTC
[R] [lattice] lines for stripplot (like dotplot) or jitter for dotplot?
On Wednesday 15 January 2003 09:41 am, Michael A. Miller wrote:> I'd like to use stripplot for some plots because I want to use > the jitter parameter. On the other hand, I'd like to use dotplot > because I'd like to have the horizontal lines that it includes. > dotplot doesn't have a jitter option and I'm not having any > success with getting panel.grid(h=-1) with stripplot. Can anyone > show me how to make dotplot-like lines on a stripplot? Or how to > jitter the vertical plotting position on a dotplot?In stripplot, try with something like panel = function(x, y, ...) { panel.abline(h = unique(as.numeric(y)), col = "grey") panel.stripplot(x, y, ...) } (or more generally, with col = trellis.par.get("reference.line")$col etc) Deepayan