Thanks to everyone for the feedback, I actually tend to agree that the use
of two different y axes in the same plot should be discouraged. Sometimes
it's just too convenient...
In the end, I used `Geom.subplot_grid` with a `Geom.bar` plot which worked
fine. However, it only worked with
Somehow, I didn't find the reasoning in that particular example very
convincing. The real problem in that example---which the post completely
ignores---is that neither of the axes starts at 0. (The zeros should also
align between the two axes.) I can't see the objection to displaying the
I'd like to replicate the behavior of matlab's `plotyy` in Gadfly, i.e.,
I'm trying to plot data with very different `y` axes but the same `x` axes
on the same plot, any idea of how to get this done? `layer` always seems to
use the same base `y` axis.
Thanks for any pointers,
Sven
Don't do it. It's not good data visualization practice, and is explicitly
and intentionally not supported in most grammar of graphics
implementations. See, for one recent post I have handy:
http://junkcharts.typepad.com/junk_charts/2014/02/a-message-worth-repeating.html
Two good alternatives are