<br><br>On Sunday, September 28, 2014, John Regan <<a href="mailto:johnanthonyregan@gmail.com">johnanthonyregan@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Nathan, <div><br></div><div>Thanks for that. I'll have a look at what helper functions would be useful as I use the ProfilePlot routine and I can issue a PR then. I think it would be worth updating the docs with info like you just sent me.</div></div></blockquote><div><br></div><div>Again, please feel free to open a pull request.<span></span></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Cheers,</div><div>John</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Sep 28, 2014 at 11:17 AM, Nathan Goldbaum <span dir="ltr"><<a href="javascript:_e(%7B%7D,'cvml','nathan12343@gmail.com');" target="_blank">nathan12343@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi John,<div><br></div><div>ProfilePlot is a wrapper around the Profile1D class, which calculates and stores the histograms. To access the underlying data you need to access the profile object via the profiles attribute of the ProfilePlot:</div><div><br></div><div>import yt</div><div>ds = yt.load('IsolatedGalaxy/galaxy0030/galaxy0030')</div><div>plot = yt.ProfilePlot(ds.all_data(), 'radius', 'density')</div><div>profile = plot.profiles[0]</div><div>print profile.x_field, profile.x</div><div>print profile.field_data.keys(), profile['density']</div><div><br></div><div>There are probably a number of ways that the current API can be improved to make it more straightforward to access this data. PRs along this front would be very welcome, I think.</div><div><br></div><div>-Nathan</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Sun, Sep 28, 2014 at 1:05 AM, John Regan <span dir="ltr"><<a href="javascript:_e(%7B%7D,'cvml','johnanthonyregan@gmail.com');" target="_blank">johnanthonyregan@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">HI All, <div><br></div><div>Is there an easy way to access the x_field and the y_fields in the ProfilePlot function?</div><div><br></div><div>So for example </div><div><br></div><div>prof = ProfilePlot(sphere, "radius", "density")</div><div><br></div><div><br></div><div>print prof.x_field</div><div>print prof.y_field[0]</div><div><br></div><div>I inserted a couple of hack functions into the ProfilePlot class to return the x_field and the .items() tuple but there is probably a better way?</div><span><font color="#888888"><div><br></div><div>John</div></font></span></div>
<br></div></div>_______________________________________________<br>
yt-users mailing list<br>
<a href="javascript:_e(%7B%7D,'cvml','yt-users@lists.spacepope.org');" target="_blank">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></blockquote></div><br></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="javascript:_e(%7B%7D,'cvml','yt-users@lists.spacepope.org');" target="_blank">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></blockquote></div><br></div>
</blockquote>