<div dir="ltr">Hey Matt,<div><br></div><div>Thanks for the general idea of getting this started. I've added a simple recipe to the cookbook showing how one can make a contour plot from a dataset. </div><div><br></div>
<div style>Chris</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 24, 2013 at 10:54 AM, Matthew Turk <span dir="ltr"><<a href="mailto:matthewturk@gmail.com" target="_blank">matthewturk@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey Chris,<br>
<br>
I think your best bet might be to do the full process -- create a<br>
slice, annotate it with contours (maybe even filled contours, which<br>
could be an option), and then access the matplotlib axes object. On<br>
the axes object there will be an attribute called images, or image,<br>
which will contain all the matplotlib.image.AxesImage objects. I<br>
believe you can set the alpha on an AxesImage object to 0.0 using<br>
set_alpha, which should de-blend it, but you may also be able to call<br>
set_visible(False).<br>
<br>
But I like this idea, and maybe we should make it easier to do.<br>
Here's an example of getting at the axes objects:<br>
<br>
<a href="http://yt-project.org/docs/2.5/cookbook/simple_plots.html#accessing-and-modifying-plots-directly" target="_blank">http://yt-project.org/docs/2.5/cookbook/simple_plots.html#accessing-and-modifying-plots-directly</a><br>
<br>
If this works for you, it'd probabyl be worth a quick recipe in the cookbook.<br>
<br>
-Matt<br>
<div><div class="h5"><br>
On Fri, May 24, 2013 at 1:46 PM, Chris Malone <<a href="mailto:chris.m.malone@gmail.com">chris.m.malone@gmail.com</a>> wrote:<br>
> Hi all,<br>
><br>
> I would like to be able to take a slice through a 3D dataset and then plot<br>
> just the contours of a single variable within that slice. I do not want to<br>
> overlay the contours with an annotate_countours method.<br>
><br>
> I know one way about this would be to use the FixedResolutionBuffer of some<br>
> slice plot to reconstruct a mesh-grid and the data, which can then be used<br>
> within matplotlib directly to create a contour plot.<br>
><br>
> I was curious if there was a more clever method using yt plot objects?<br>
><br>
> Chris<br>
><br>
</div></div>> _______________________________________________<br>
> yt-users mailing list<br>
> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
><br>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</blockquote></div><br></div>