[yt-users] Colorbar on Phase Plots

Matthew Turk matthewturk at gmail.com
Thu Aug 22 07:19:49 PDT 2013


Hi Patrick,

Thanks for writing!  I believe you would be best suited to modifying
slightly how you call to_mpl() and supplying your own ax object.  So
I'd recommend doing something like:

 * Construct the figure you want using the matplotlib API, including
the axes for the figure but not yet the colorbar.
 * Call to_mpl() and supply the axes object that you created above.
This will plot inside that axes.
 * Now, add your colorbar as Matplotlib normally would.

Does that make sense?  Let me know if it works for you!

-Matt

On Wed, Aug 21, 2013 at 5:36 PM, Patrick Rieser
<patrick.rieser at uibk.ac.at> wrote:
> Hi all,
>
> does anybody have an idea how to get a colorbar to show up for the zfield
> (weight=none) with the PhasePlotter? I am using log scaling and I'd like to
> have the colorbar for the zfield logarithmic as well. I used the
> PhasePlotter as described at the following page:
>
> http://yt-project.org/doc/visualizing/manual_plotting.html#phase-plots
>
> Just to be clear, what I'd like to have is something like this (just on the
> right side of the plot):
> http://matplotlib.org/examples/api/colorbar_only.html
>
> Best wishes,
> Patrick.
> _______________________________________________
> 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