<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 2, 2014 at 1:40 PM, Chris Malone <span dir="ltr"><<a href="mailto:chris.m.malone@gmail.com" target="_blank">chris.m.malone@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">My original impression was that code_* units were just intended to be used internally.  I can't think of any of my use cases where I'd ever want code_* units to be displayed on a plot; I can imagine others possibly wanting such a thing if their code is written in non-dimensional units, for example.</div></blockquote><div><br></div><div>The "code" unit symbols are "fully qualified" unit symbols.  From the point of view of the unit system they are on the same footing as "physical" units like cm or gram.</div><div><br></div><div>In your example you explicitly specified that you wanted the axes units to be code units by passing in a width tuple containing YTQuantity instances with units of code_length.  If you pass in a unitful quantity as the width, I think the only safe and convenient thing to do is to label the plot using the provided units.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><div class="gmail_quote">On Thu, Oct 2, 2014 at 2:17 PM, Nathan Goldbaum <span dir="ltr"><<a href="mailto: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"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Thu, Oct 2, 2014 at 12:47 PM, Nathan Goldbaum <span dir="ltr"><<a href="mailto: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"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Thu, Oct 2, 2014 at 12:45 PM, Chris Malone <span dir="ltr"><<a href="mailto:chris.m.malone@gmail.com" target="_blank">chris.m.malone@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">So I should be interpreting code_* units as separate from whatever is set as ds.length_unit, ds.time_unit, ds.mass_unit, etc.?</div></blockquote><div><br></div></span><div>No, they're the same. It just doesn't automatically replace code_length with whatever ds.length_unit is.</div><div><div><div> </div></div></div></div></div></div></blockquote><div><br></div></span><div>Something I could get behind (although this would likely break a lot of things) would be presenting Dataset attributes in physical units (i.e. whatever ds.length_unit is).</div><div><br></div><div>Since we use Dataset attributes at the cython level, this would be a bit of work to change, but I think it's doable.</div><div><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 class="gmail_extra"><div class="gmail_quote"><div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 2, 2014 at 1:39 PM, Nathan Goldbaum <span dir="ltr"><<a href="mailto: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"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Thu, Oct 2, 2014 at 12:35 PM, Chris Malone <span dir="ltr"><<a href="mailto:chris.m.malone@gmail.com" target="_blank">chris.m.malone@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">Yup.  That one was screwy, and I had no idea what to think of it.  Filed here <a href="https://bitbucket.org/yt_analysis/yt/issue/915/sliceplot-fails-with-odd-combination-of" target="_blank">https://bitbucket.org/yt_analysis/yt/issue/915/sliceplot-fails-with-odd-combination-of</a><div><br></div><div>I'm trying to understand if the second plot is working as intended.  I'm happy to change my intuition about units, but I would like some clarification.</div></div><div><div><div class="gmail_extra"><br></div></div></div></blockquote><div><br></div></span><div>I think so, you specified that you wanted the width in code units, since domain_left_edge and domain_right_edge are in code units.  If you explicitly specify a width tuple it will make the plot in whichever units you specify.</div><span><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div class="gmail_extra"><div class="gmail_quote">On Thu, Oct 2, 2014 at 1:28 PM, Nathan Goldbaum <span dir="ltr"><<a href="mailto: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">That last plot looks like you're exposing a bug to me.  Can you file an issue?<br><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Thu, Oct 2, 2014 at 12:26 PM, Chris Malone <span dir="ltr"><<a href="mailto:chris.m.malone@gmail.com" target="_blank">chris.m.malone@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">All,<div><br></div><div>I'm seeing some behavior[1] with units of axes that seems counter-intuitive, but maybe I need to change my intuition.</div><div><br></div><div>In particular, if one makes a slice plot, but specifies the width of the plot in units of 'code_length' - for example, from using domain_right_edge - the units aren't properly converted to whatever was set as `ds.length_unit`.  Is this working as intended?  Are users expected to manually apply `.in_cgs()` to such items that have code_length?  Naively, I would expect that when units are displayed, if they are code_* units, they should be converted to whatever is declared in `ds._set_code_unit_attributes`.</div><div><br></div><div><br></div><div>[1] <a href="http://nbviewer.ipython.org/urls/dl.dropbox.com/s/bf62wclpjduvlit/example.ipynb?dl=0" target="_blank">http://nbviewer.ipython.org/urls/dl.dropbox.com/s/bf62wclpjduvlit/example.ipynb?dl=0</a></div><span><font color="#888888"><div><br></div><div>Chris</div></font></span></div>
<br></div></div>_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org" target="_blank">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
<br></blockquote></div><br></div></div>
<br>_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org" target="_blank">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org" target="_blank">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
<br></blockquote></span></div><br></div></div>
<br>_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org" target="_blank">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org" target="_blank">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
<br></blockquote></div></div></div><br></div></div>
</blockquote></div></div></div><br></div></div>
<br>_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org" target="_blank">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
<br></blockquote></div><br></div></div>