Open MichaelChirico opened 4 years ago
From: "hadley wickham" <h.wickham@<::CENSORED -- SEE ORIGINAL ON BUGZILLA::>>
So given the help file, we should consider dropping the whole
``along the boxplot'' idea?
{{well, yes, we should drop "traditional graphics" and work with
grid-based graphical objects ("grob"s) that can be drawn
vertically or horizontally,
e.g., in lattice or (most probably) ggplot2
}}
ggplot2 does this in a completely general way (i.e. for all types of graphics) with the coord_flip coordinate system, which flips the interpretation of the x and y scales. This includes producing smoothers of x conditional on y, and so forth.
Hadley
NOTES: as docuemnted, if not ideal
Audit (from Jitterbug): Tue Oct 16 13:47:05 2007 ripley moved from incoming to Graphics Mon Dec 15 17:59:03 2008 ripley changed notes Mon Dec 15 16:59:03 2008 ripley moved from Graphics to wishlist
From: bob.ohara@<::CENSORED -- SEE ORIGINAL ON BUGZILLA::> Full_Name: Bob O'Hara Version: 2.6.0 OS: Windows XP Submission from: (NULL) (88.112.20.250)
Using horizontal=TRUE with boxplot() confuses it as to what is an x- or y-axis. At least, xlim= and ylim= are the wrong way round, log="x" (or "y") and xaxt= work as expected, I haven't looked at anything else.
Some code to see if you can reproduce the bug (or discover it's in my head...):
boxplot(count∼ spray, data = InsectSprays)
# Try to change x-axis: boxplot(count∼ spray, data = InsectSprays, xlim=c(0,50))
# Plot horizontally: boxplot(count∼ spray, data = InsectSprays, horizontal=TRUE)
# Now try to change x-axis: boxplot(count∼ spray, data = InsectSprays, horizontal=TRUE, xlim=c(0,50)) # Changes y-axis!
# Now try to change y-axis: boxplot(count∼ spray, data = InsectSprays, horizontal=TRUE, ylim=c(0,50)) # Changes x-axis!
# Plot x-axis on log scale: boxplot(count+1∼ spray, data = InsectSprays, horizontal=TRUE, log="x") # Does indeed change x-axis
# Don't add ticks on x-axis: boxplot(count∼ spray, data = InsectSprays, horizontal=TRUE, xaxt="n") # Works as expected.
METADATA