<div dir="ltr"><div><div>Yeah, that's definitely going to do the trick, thanks!  I really need to take the time to figure out how to make my own PRs...<br><br></div>Thanks again,<br><br></div>Stephanie<br><br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div><div><font face="garamond,serif">--<br>Dr. Stephanie Tonnesen<br></font></div><font face="garamond,serif">Alvin E. Nashman Postdoctoral Fellow<br></font></div><font face="garamond,serif">Carnegie Observatories, Pasadena, CA<br></font></div><font face="garamond,serif"><a href="mailto:stonnes@gmail.com" target="_blank">stonnes@gmail.com</a><br></font></div></div></div>
<br><div class="gmail_quote">On Wed, Aug 12, 2015 at 7:38 AM, 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">Thanks for narrowing down where to look. The issue was in the get_label function. I've proposed a PR to fix this here: <a href="https://bitbucket.org/yt_analysis/yt/pull-requests/1695/use-the-nice-latex-representation-for/diff" target="_blank">https://bitbucket.org/yt_analysis/yt/pull-requests/1695/use-the-nice-latex-representation-for/diff</a></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 12, 2015 at 2:03 AM, Stephanie Tonnesen <span dir="ltr"><<a href="mailto:stonnes@gmail.com" target="_blank">stonnes@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"><div>Actually, it looks like camera.py is calling get_label, which does try to latex-up the units.  Could it be that the command r"$g/cm**3$" will not work and what the label input needs is r"$g/cm^3$"?  Just double-checked in my own python code, and even though I am not actually sure how to fix it, I bet that is the issue!<span><font color="#888888"><br><br></font></span></div><span><font color="#888888">-Stephanie<br></font></span></div><div class="gmail_extra"><span><br clear="all"><div><div><div dir="ltr"><div><div><div><font face="garamond,serif">--<br>Dr. Stephanie Tonnesen<br></font></div><font face="garamond,serif">Alvin E. Nashman Postdoctoral Fellow<br></font></div><font face="garamond,serif">Carnegie Observatories, Pasadena, CA<br></font></div><font face="garamond,serif"><a href="mailto:stonnes@gmail.com" target="_blank">stonnes@gmail.com</a><br></font></div></div></div>
<br></span><div><div><div class="gmail_quote">On Tue, Aug 11, 2015 at 11:44 PM, Stephanie Tonnesen <span dir="ltr"><<a href="mailto:stonnes@gmail.com" target="_blank">stonnes@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"><div>Yeah, I cant figure out where it is being set either--I am certainly not consciously setting it in my script!  I will look into it more tomorrow.  Thanks,<br><br></div><div>Stephanie<br></div></div><div class="gmail_extra"><span><br clear="all"><div><div><div dir="ltr"><div><div><div><font face="garamond,serif">--<br>Dr. Stephanie Tonnesen<br></font></div><font face="garamond,serif">Alvin E. Nashman Postdoctoral Fellow<br></font></div><font face="garamond,serif">Carnegie Observatories, Pasadena, CA<br></font></div><font face="garamond,serif"><a href="mailto:stonnes@gmail.com" target="_blank">stonnes@gmail.com</a><br></font></div></div></div>
<br></span><div><div><div class="gmail_quote">On Tue, Aug 11, 2015 at 10:16 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">You can get a nice LaTeX rendering of the units for any YTarray or YTQuantity like so:<div><br></div><div><div>In [9]: from yt.units import g,cm</div><div><br></div><div><div>In [10]: g/cm**3</div><div>Out[10]: 1.0 g/cm**3</div><div><br></div><div>In [11]: type(g/cm**3)</div><div>Out[11]: yt.units.yt_array.YTQuantity</div></div><div><br></div><div>In [12]: (g/cm**3).units.latex_representation()</div><div>Out[12]: '\\frac{\\rm{g}}{\\rm{cm}^{3}}'</div></div><div><br></div><div>I'm not sure where in the code the colorbar unit is getting generated, but right now it's displaying str(unit) instead of str(unit.latex_representation()).</div><div><br></div><div>Hope that helps,</div><div><br></div><div>Nathan</div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 12, 2015 at 12:05 AM, Stephanie Tonnesen <span dir="ltr"><<a href="mailto:stonnes@gmail.com" target="_blank">stonnes@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"><div><div>Dear Michael,<br><br></div>That did the trick!  Thanks very much!  Since that worked so well, is there a way I can get the density units to look a bit nicer (actually have the "3" superscript instead of "cm**3"?)  Thanks again,<br><br></div>Stephanie<br></div><div class="gmail_extra"><span><br clear="all"><div><div><div dir="ltr"><div><div><div><font face="garamond,serif">--<br>Dr. Stephanie Tonnesen<br></font></div><font face="garamond,serif">Alvin E. Nashman Postdoctoral Fellow<br></font></div><font face="garamond,serif">Carnegie Observatories, Pasadena, CA<br></font></div><font face="garamond,serif"><a href="mailto:stonnes@gmail.com" target="_blank">stonnes@gmail.com</a><br></font></div></div></div>
<br></span><div><div><div class="gmail_quote">On Tue, Aug 11, 2015 at 2:06 PM, Cameron Hummels <span dir="ltr"><<a href="mailto:chummels@gmail.com" target="_blank">chummels@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">I don't believe Stephanie is using the new VR interface for this problem.</div><div class="gmail_extra"><div><div><br><div class="gmail_quote">On Tue, Aug 11, 2015 at 2:04 PM, Michael Zingale <span dir="ltr"><<a href="mailto:michael.zingale@stonybrook.edu" target="_blank">michael.zingale@stonybrook.edu</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">A while back I added a label_fmt argument to save_annotated:<div><br></div><div><div>        label_fmt : str, optional                                               </div><div>           A format specifier (e.g., label_fmt="%.2g") to use in formatting     </div><div>           the data values that label the transfer function colorbar.    </div></div><div><br></div><div>this fixed the values for me so they look reasonable.</div><div><br></div><div>Note: I don't think any of this has made it over to the new VR interface.</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Tue, Aug 11, 2015 at 2:42 PM, Stephanie Tonnesen <span dir="ltr"><<a href="mailto:stonnes@gmail.com" target="_blank">stonnes@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"><div><div><div><div>Hi yt-users,<br><br></div><div>My last attempt was too big to make it to the user list, so I will try again!<br></div><span>I am trying to make a volume rendering using <br>---<br>Version = 3.2-dev<br>Changeset = dc2467c4eae7 (yt) tip<br>---<br></span></div><span>and basically following this example:<br><br><a href="http://bender.astro.sunysb.edu/random/vol_rotate.py" target="_blank">http://bender.astro.sunysb.edu/random/vol_rotate.py</a><br><br></span></div>My
 problem is that the units are wonky on my colorbar.  I input them in my
 transfer function as cgs, and the peaks seem to be in the right place 
based on my input range and sample values.  Can I get the colorbar to 
present the density values in cgs?  You can see the colorbar and the code 
attached.  <br><span><br>Oh, I had to add in the line <br>matplotlib.use('pdf') <br>because
 I was getting a _tkinter can't find your screen error everytime I tried
 to add the colorbar.  I think it was a matplotlib with my computer 
problem.<br><br>Thanks!  <br><br></span></div><span>Stephanie<div><div><div dir="ltr"><div><div><div><font face="garamond,serif">--<br>Dr. Stephanie Tonnesen<br></font></div><font face="garamond,serif">Alvin E. Nashman Postdoctoral Fellow<br></font></div><font face="garamond,serif">Carnegie Observatories, Pasadena, CA<br></font></div><font face="garamond,serif"><a href="mailto:stonnes@gmail.com" target="_blank">stonnes@gmail.com</a><br></font></div></div></div>
</span></div>
<br></div></div>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto: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" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><div>Michael Zingale</div><div>Associate Professor</div><div><br></div><div>Dept. of Physics & Astronomy • Stony Brook University • Stony Brook, NY 11794-3800</div><div><i>phone</i>:  <a href="tel:631-632-8225" value="+16316328225" target="_blank">631-632-8225</a></div><div><i>e-mail</i>: <a href="mailto:Michael.Zingale@stonybrook.edu" target="_blank">Michael.Zingale@stonybrook.edu</a></div><div><i>web</i>: <a href="http://www.astro.sunysb.edu/mzingale" target="_blank">http://www.astro.sunysb.edu/mzingale</a></div><div>github: <a href="http://github.com/zingale" target="_blank">http://github.com/zingale</a></div><div><br></div></div></div></div>
</font></span></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto: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" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br></div></div><span><font color="#888888"><div><div dir="ltr"><div>Cameron Hummels<div><span style="font-size:12.8000001907349px">NSF Postdoctoral Fellow</span></div><div><span style="font-size:12.8000001907349px">Department of Astronomy</span></div><div><span style="font-size:12.8000001907349px">California Institute of Technology</span><br></div><div><a href="http://chummels.org" style="font-size:12.8000001907349px" target="_blank">http://chummels.org</a><br></div></div></div></div>
</font></span></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto: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" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto: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" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto: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" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto: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" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>
</div></div><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" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>