[Matplotlib-users] plot with 2 scales (not 2 plots)

Neal Becker ndbecker2 at gmail.com
Thu Jan 14 09:50:54 EST 2016


Thanks, but I want 2 scales on the bottom.  The scale produced by twiny
seems to go on the top.  While I can fix the position with
ax_c = ax_f.twiny()
fig.subplots_adjust(bottom=0.2)
ax_c.spines["top"].set_position(("axes", -0.2))

that will leave me with x-axis label and tick marks going the wrong way for
the bottom

On Thu, Jan 14, 2016 at 9:43 AM, Benjamin Root <ben.v.root at gmail.com> wrote:

> Just do a parasite axis using axisartist. This example does have two
> plots, but you don't have to do the first one:
> http://matplotlib.org/examples/axes_grid/demo_parasite_axes2.html
>
> Cheers!
> Ben Root
>
>
> On Thu, Jan 14, 2016 at 8:15 AM, Neal Becker <ndbecker2 at gmail.com> wrote:
>
>> I'm trying to make a plot which has 2 scales (linearly related), but just
>> 1
>> set of data.  I've seen many examples with 2 plots and 2 scales, but
>> that's
>> not what I need here.
>>
>> I blindly followed some examples and was able to make a pretty good plot
>> with one scale on bottom and one on top.  I'd like to see how it looks
>> with
>> 2 scales on the bottom, with an offset between them, but I don't know how
>> to
>> do it.
>>
>> Attached is the current version.
>> _______________________________________________
>> Matplotlib-users mailing list
>> Matplotlib-users at python.org
>> https://mail.python.org/mailman/listinfo/matplotlib-users
>>
>>
>


-- 
*Those who don't understand recursion are doomed to repeat it*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20160114/9fe48467/attachment-0001.html>


More information about the Matplotlib-users mailing list