[yt-users] Place plot on a specified matplotlib axis

Nathan Goldbaum nathan12343 at gmail.com
Fri Jan 9 09:16:11 PST 2015


Hi David,

Here's a quick and dirty example using a SlicePlot:

http://nbviewer.ipython.org/gist/ngoldbaum/b9e7f82c86c40bbc2cd1

Note that PlotWindow plots have control over their own axis ratios, so you
will need to construct you plot around the known axis ratio.

This will also look somewhat different if you use a ProfilePlot, since that
plotting class has a somewhat different underlying implementation.

Best,

Nathan

On Thu, Jan 8, 2015 at 10:13 PM, David Ketcheson <
david.ketcheson at kaust.edu.sa> wrote:

>   I would like to insert a yt-generated plot in a particular matplotlib
> axes object that I created. In matplotlib, I can do this via
> fig2 = plt.figure()
> ax2 = fig2.add_axes([0.15, 0.1, 0.7, 0.3])
> ax2.plot(x,y)
>
>  which will place the plot on the axes ax2.  Is there any way to do this
> in yt?
>
>
>>
> ------------------------------
>
> This message and its contents including attachments are intended solely
> for the original recipient. If you are not the intended recipient or have
> received this message in error, please notify me immediately and delete
> this message from your computer system. Any unauthorized use or
> distribution is prohibited. Please consider the environment before printing
> this email.
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20150109/2cead237/attachment.htm>


More information about the yt-users mailing list