coord_flip and free scales

46 views
Skip to first unread message

Ben Bolker

unread,
Dec 26, 2012, 5:23:47 PM12/26/12
to ggplot2
In an example ( http://rpubs.com/bbolker/3324 ), I wanted to (1)
overlay boxplots and violin plots, (2) use facet_wrap with free scales
to get separate scaling for each variable, (3) lay the figure out
horizontally (i.e. horizontal boxplots and violins).

I think this is a fairly well known issue, e.g.

https://github.com/hadley/ggplot2/issues/95

The last time I encountered this I created a new, horizontal version
of the geom I wanted (I think it was geom_hlinerange), but in this
case I would have to modify both geom_boxplot and geom_violin, and
they're both a bit more complex than linerange (so more chances to
screw up), so I thought I would ask whether a fix was on the horizon
or whether someone else had a workaround that I haven't thought of ...

thanks
Ben Bolker

Brandon Hurr

unread,
Dec 28, 2012, 12:18:53 PM12/28/12
to Ben Bolker, ggplot2
Ben,

I've been thinking about this over Christmas and really haven't come to any conclusions other than setting the angle of the axis values and rotating the whole image. It's a bit of a hack, but I think it's been a tentative solution for this issue for some time. I've used it before. I'm sorry that's not very helpful, but it's the best I can think of other than hacking away at each function. At least it gets the job done? 

Brandon


    Ben Bolker

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

Ben Bolker

unread,
Dec 28, 2012, 1:14:10 PM12/28/12
to Brandon Hurr, ggplot2
Thanks.

So far my 'solution' has been to decide that I don't need the
horizontal orientation that badly, and to give up ...
> <mailto:ggp...@googlegroups.com>
> To unsubscribe: email ggplot2+u...@googlegroups.com
> <mailto:ggplot2%2Bunsu...@googlegroups.com>
> More options: http://groups.google.com/group/ggplot2
>
>

Reply all
Reply to author
Forward
0 new messages