scale dot size with y axis for dotplots

37 views
Skip to first unread message

Jeroen Ooms

unread,
Nov 7, 2013, 7:06:40 PM11/7/13
to ggplot2
Is there any way to scale the size of the dots for dotplots such that
they will always fit on the page? By default the size equal to the
binwidth which causes trouble when there are many points, or when the
distribution is heavily skewed:

mydata <- data.frame(x = c(rpois(500, 1),20))
ggplot(mydata, aes(x=x)) + geom_dotplot()

April Peterson

unread,
Sep 28, 2015, 6:41:42 PM9/28/15
to ggplot2
I am also having alot of difficultly with this aspect of geom_dotplot. The only solution I've come to from search the web and fiddling with my code is to adjust the ylim() or xlim(). But often this will leave your plot with even more white space.

Hadley Wickham

unread,
Sep 29, 2015, 11:36:21 AM9/29/15
to Jeroen Ooms, ggplot2
No, unfortunately I think it's basically impossible.

Hadley
> --
> --
> 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.



--
http://had.co.nz/
Reply all
Reply to author
Forward
0 new messages