<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Doris,<div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div class="" style="font-size: 12.8000001907349px;">is there a simpler way to do this directly on yt using annotate_contour or some other yt function?</div></div></blockquote></div><div class=""><br class=""></div><div class="">Yes — you can overplot a circle using this plot modification callback: <a href="http://yt-project.org/docs/dev/visualizing/callbacks.html#overplot-a-circle-on-a-plot" class="">http://yt-project.org/docs/dev/visualizing/callbacks.html#overplot-a-circle-on-a-plot</a></div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div class="" style="font-size: 12.8000001907349px;"> is there to get my RAMSES data loaded into yt as a numpy array with actual numbers in them then feed it into matplotlib to do this task?</div></div></blockquote><br class=""></div><div class="">That’s also available via fixed resolution buffer: <a href="http://yt-project.org/docs/dev/visualizing/manual_plotting.html#slice-projections-and-other-images-the-fixed-resolution-buffer" class="">http://yt-project.org/docs/dev/visualizing/manual_plotting.html#slice-projections-and-other-images-the-fixed-resolution-buffer</a></div><div class=""><br class=""><div apple-content-edited="true" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Best wishes,</div><div class="">--</div><div class="">Suoqing JI</div><div class="">Ph.D Student</div><div class="">Department of Physics</div><div class="">University of California, Santa Barbara</div><div class=""><a href="http://web.physics.ucsb.edu/~suoqing" class="">http://web.physics.ucsb.edu/~suoqing</a></div></div></div></div></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Jun 1, 2015, at 9:13 PM, DORIS LEE <<a href="mailto:dorislee@berkeley.edu" class="">dorislee@berkeley.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><span style="font-size:12.8000001907349px" class="">Hi all, </span><div style="font-size:12.8000001907349px" class=""><br class=""></div><div style="font-size:12.8000001907349px" class="">I have been trying to plot a circle of a given radius around the boundary of a collapsing cloud to track its evolution. </div><div style="font-size:12.8000001907349px" class="">Usually in matplotlib, I would just draw a circle using a xy meshgrid, but if I do this using matplotlib the circle would be on a separate figure and not overlaid on the yt plot. So I tried using a PlotWindow to separate the data and the yt plot  but I get this error:</div><div style="font-size:12.8000001907349px" class=""><br class=""></div><div style="font-size:12.8000001907349px" class=""><div style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px;" class=""><div style="min-width:11ex;padding:0.4em;margin:0px;font-family:monospace;text-align:right;line-height:1.21429em;color:rgb(0,0,128);border-top-width:1px;border-top-style:solid;border-top-color:transparent" class="">In [92]:<span style="font-family:inherit;line-height:inherit;color:inherit;font-size:inherit;background-color:transparent" class="">yt</span><span style="font-family:inherit;line-height:inherit;color:inherit;font-size:inherit;background-color:transparent" class="">.</span><span style="font-family:inherit;line-height:inherit;color:inherit;font-size:inherit;background-color:transparent" class="">visualization</span><span style="font-family:inherit;line-height:inherit;color:inherit;font-size:inherit;background-color:transparent" class="">.</span><span style="font-family:inherit;line-height:inherit;color:inherit;font-size:inherit;background-color:transparent" class="">plot_window</span><span style="font-family:inherit;line-height:inherit;color:inherit;font-size:inherit;background-color:transparent" class="">.</span><span style="font-family:inherit;line-height:inherit;color:inherit;font-size:inherit;background-color:transparent" class="">PlotWindow</span><span style="font-family:inherit;line-height:inherit;color:inherit;font-size:inherit;background-color:transparent" class="">(</span><span style="font-family:inherit;line-height:inherit;color:inherit;font-size:inherit;background-color:transparent" class="">proj</span><span style="font-family:inherit;line-height:inherit;color:inherit;font-size:inherit;background-color:transparent" class="">,(</span><span style="font-family:inherit;line-height:inherit;font-size:inherit;color:rgb(170,34,255);font-weight:bold;background-color:transparent" class="">-</span><span style="font-family:inherit;line-height:inherit;font-size:inherit;color:rgb(0,136,0);background-color:transparent" class="">1e5</span><span style="font-family:inherit;line-height:inherit;color:inherit;font-size:inherit;background-color:transparent" class="">,</span><span style="font-family:inherit;line-height:inherit;font-size:inherit;color:rgb(0,136,0);background-color:transparent" class="">1e5</span><span style="font-family:inherit;line-height:inherit;color:inherit;font-size:inherit;background-color:transparent" class="">,</span><span style="font-family:inherit;line-height:inherit;font-size:inherit;color:rgb(170,34,255);font-weight:bold;background-color:transparent" class="">-</span><span style="font-family:inherit;line-height:inherit;font-size:inherit;color:rgb(0,136,0);background-color:transparent" class="">1e5</span><span style="font-family:inherit;line-height:inherit;color:inherit;font-size:inherit;background-color:transparent" class="">,</span><span style="font-family:inherit;line-height:inherit;font-size:inherit;color:rgb(0,136,0);background-color:transparent" class="">1e5</span><span style="font-family:inherit;line-height:inherit;color:inherit;font-size:inherit;background-color:transparent" class="">))</span></div></div><div style="display:flex;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;line-height:20px" class=""><div style="display:flex" class=""><div style="padding:0px;display:flex" class=""><div style="padding:0.4em 0.4em 0px;line-height:1.21429em" class=""><pre style="white-space:pre-wrap;padding:0px;font-size:inherit;border-radius:0px;margin-top:0px;margin-bottom:0px;line-height:inherit;word-break:break-all;word-wrap:break-word;border:0px;vertical-align:baseline;background-color:transparent" class=""><span style="color:rgb(139,0,0)" class="">AttributeError</span><font class="">: 'ProjectionPlot' object has no attribute '_key_fields'
</font></pre><div style="" class=""><br class=""></div></div></div></div></div></div><div style="font-size:12.8000001907349px" class="">In general, is there to get my RAMSES data loaded into yt as a numpy array with actual numbers in them then feed it into matplotlib to do this task? or alternatively, is there a simpler way to do this directly on yt using annotate_contour or some other yt function?</div><div style="font-size:12.8000001907349px" class=""><br class=""></div><div style="font-size:12.8000001907349px" class="">Thank you.</div><div style="font-size:12.8000001907349px" class=""><br class=""></div><div style="font-size:12.8000001907349px" class="">Regards,</div><div style="font-size:12.8000001907349px" class="">Doris</div><div style="font-size:12.8000001907349px" class="">----</div><div style="font-size:12.8000001907349px" class="">Code for generating the attached plot, the green boundary line is in theory what I am trying to draw.</div><div style="font-size:12.8000001907349px" class=""><br class=""></div><div style="font-size:12.8000001907349px" class=""><div class="">ds= yt.load("../../bin/output_00002/info_00002.txt")</div><div class="">proj = yt.ProjectionPlot(ds, "y", "density",window_size=10)</div><div class="">proj.set_cmap("density","rainbow")</div><div class="">proj.annotate_velocity()</div><div class="">proj.show()</div></div></div>
<span id="cid:FE34E5E9-D8D4-4032-A405-7A707D3B5E3D"><rho.png></span>_______________________________________________<br class="">yt-users mailing list<br class=""><a href="mailto:yt-users@lists.spacepope.org" class="">yt-users@lists.spacepope.org</a><br class="">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org<br class=""></div></blockquote></div><br class=""></div></body></html>