geom_jitter

5 views
Skip to first unread message

J H

unread,
Mar 5, 2014, 7:10:51 PM3/5/14
to ggplot2
I noticed when I plot values that are zero in value the points as jitter still appear event though the box is not even displayed.  Do I need to change something in my code:(position = position_jitter(width=0.1)

I guess the function above jitters vertical as well? I thought it was height...please advise the full code I am using is below. 

Thank you.



ggplot(my.table, aes(x=State, y=Value, fill=State)
+ geom_boxplot(outlier.colour = NA)
+ scale_fill_manual(values=c("dodgerblue", "pink1"))
+ geom_jitter(position = position_jitter(width=0.1), color="black", size=3, alpha=0.3)


Roman Luštrik

unread,
Mar 6, 2014, 2:02:05 AM3/6/14
to J H, ggplot2
Jitter works in horizontal and vertical way. You are currently jittering horizontally (width). You can so do vertically (`height`), but if you have values on y, this may not be correct.

Cheers,
Roman


--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
 
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2

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



--
In God we trust, all others bring data.
Reply all
Reply to author
Forward
0 new messages