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

Kacper Kowalik xarthisius.kk at gmail.com
Fri Jan 9 07:06:12 PST 2015


On 01/09/2015 12:13 AM, David Ketcheson 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?

Hi David!
There is a couple examples in the cookbook of how to do that depending
on whether your yt object is a slice or a profile:

http://yt-project.org/docs/3.0/cookbook/complex_plots.html

Let us know if that answers your question.
Cheers,
Kacper

> 
>> 
> ________________________________
> 
> 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 --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20150109/eebf47c7/attachment.pgp>


More information about the yt-users mailing list