Plot Builder jitter height not defaulting to zero.

31 views
Skip to first unread message

Bill Altermatt

unread,
Oct 1, 2013, 10:56:03 AM10/1/13
to ded...@googlegroups.com
Hi, all,

Just noticed a possible bug in Plot Builder that I think may have an easy fix.  The bug is that when the user sets the dots to jitter and specifies a width for the jitter (such as 0.1), those dots also jitter in height by what appears to be the same amount.  Not good, because height is supposed to reflect exact values on the y-axis.  The problem disappears if you set the jitter height to 0.  The fix I propose is to make the default values of the height and width jitter 0.

--Bill

Ian Fellows

unread,
Oct 3, 2013, 1:14:29 AM10/3/13
to ded...@googlegroups.com
I understand the problem, and this is a common gotcha with ggplot2, but I'm hesitant to break the symmetry between the plot builder and ggplot2. Consider

ggplot() + geom_point(aes(x = mpg,y = cyl),data=mtcars,position = position_jitter(height=.1))

and

ggplot() + geom_point(aes(x = mpg,y = cyl),data=mtcars,position = position_jitter(width=.1))


both jitter the x and y coordinates even though only one coordinate is specified. From a programatic standpoint, the behavior is not wrong, but I agree that it can be less than desirable in many cases. My suggestion is to bring up the defaults with the ggplot2 folks.


best,
Ian





--
 
---
You received this message because you are subscribed to the Google Groups "Deducer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deducer+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages