Well, the first part is easy... it is called twinx(). If you look up axis
twinning in the documentation, you will find a lot of examples of this.

As for the grids part... that would be tricky. I would first just see if
matplotlib "just does the right thing". Doubtful, but who knows? Then I
would likely go the route of lining up the major ticks on both axes so that
the grid lines for one axes match up with the ticks for the other.

Let us know what you find out. Maybe it might be a useful feature to add
for twinning.

Cheers!
Ben Root


On Tue, Oct 21, 2014 at 2:29 PM, Neal Becker <ndbeck...@gmail.com> wrote:

> I need to overlay 2 different plots.  They will share an x-axis, but will
> have 2
> different y axis with 2 different sets of units.  I want one y-axis on
> left and
> one on right.
>
> But to make it harder, I want a grid.  That means, there are either 2
> different
> grids, which is ugly, or one plot has to be scaled vertically so that the
> same y
> grid can be shared between them.
>
> Anyone know how to do this?
>
> --
> -- Those who don't understand recursion are doomed to repeat it
>
>
>
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://p.sf.net/sfu/Zoho
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to