<div dir="ltr">I expect what's happening is that there's less than an order of magnitude of variation between the extremes of the colorbar, so no tick marks get displayed.<div><br></div><div>Can you try switching to a linear colorbar scaling? Something like "p.set_log('<span style="font-size:12.8px">sn_metal_density', False)" should do the trick.</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 23, 2017 at 7:04 PM, Clayton Strawn <span dir="ltr"><<a href="mailto:cjstrawn@ucsc.edu" target="_blank">cjstrawn@ucsc.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"><div><br></div><div>Hello, </div><div><br></div><div>I'm trying to define a new metal field and compare to the old, but the new field doesn't have any numbers on the colorbar! Changing units and setting minorticks "on" didn't help with this. </div><div><img src="cid:ii_15e117e0738aaf46" alt="Inline image 1" width="262" height="222" style="margin-right:0px"><img src="cid:ii_15e117e09b1b380f" alt="Inline image 2" width="260" height="220" style="margin-right:0px"><br></div><div><div>import yt</div><div>filename = "/Users/file_name_vela_sim.d"</div><div>ds = yt.load(filename)</div><div><br></div><div>def _SN_metal_dens(field, data):</div><div>    return data[('gas','metal_ia_density'<wbr>)]+ data[('gas','metal_ii_density'<wbr>)]</div><div>yt.add_field(("gas", "sn_metal_density"), function=_SN_metal_dens, units="g/cm**3")</div><div><br></div><div>p1 = yt.ProjectionPlot(ds,0,("gas", "sn_metal_density"), width = (1, "Mpc"))</div><div>p2 = yt.ProjectionPlot(ds,0,("gas", "metal_density"), width = (1, "Mpc"))</div><div>p1.set_cbar_minorticks(("gas", "sn_metal_density"),"on")</div><div>p2.set_cbar_minorticks(("gas", "metal_density"),"on")</div><div>p1.set_unit(("gas", "sn_metal_density"), 'g/cm**2')</div><div>p1.save()</div><div>p2.save()</div></div><div><br></div><div>How do I get a normal colorbar plot with numbers with a user-defined field?</div><span class="HOEnZb"><font color="#888888">-- <br><div class="m_-938528195566357848gmail_signature"><div dir="ltr">Physics Department UC Santa Cruz<br>1156 HIGH STREET, SANTA CRUZ, CA 95064<div><a href="tel:(916)%20749-2940" value="+19167492940" target="_blank">916-749-2940</a></div></div></div>
</font></span></div>
<br>______________________________<wbr>_________________<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/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
<br></blockquote></div><br></div>