[yt-users] Second y axis

j s oishi jsoishi at gmail.com
Mon Mar 28 09:12:47 PDT 2011


Hi Libby,

This really isn't a yt issue. Matplotlib has a faq on this topic:

http://matplotlib.sourceforge.net/faq/howto_faq.html#multiple-y-axis-scales

I like Jae-Joon Lee's AxesGrid toolkit for more complex things where
you want two different lines with separate scales on the same plot:

http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html#parasiteaxes

j

On Mon, Mar 28, 2011 at 9:02 AM, Elizabeth Harper-Clark
<h-clark at astro.utoronto.ca> wrote:
> Hi guys,
>
> I would like to plot a graph of mass in stars against time. In addition to
> the normal y axis (total stellar mass in solar masses) I would like a second
> y axis on the right side which translates this stellar mass into a fraction
> of the original gas mass. Thus the line is the same it is just the two y
> axes are scaled versions of each other. Does that make sense? Can anyone
> suggest a way to do this?
>
> Thanks,
>
> Libby
>
> --
> Elizabeth Harper-Clark MA MSci
> PhD Candidate, Canadian Institute for Theoretical Astrophysics, UofT
> Sciences and Engineering Coordinator, Teaching Assistants' Training Program,
> UofT
>
> www.astro.utoronto.ca/~h-clark
> h-clark at cita.utoronto.ca
> Astronomy office phone: +1-416-978-5759
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>



More information about the yt-users mailing list