<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')]+ data[('gas','metal_ii_density')]</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>-- <br><div class="gmail_signature"><div dir="ltr">Physics Department UC Santa Cruz<br>1156 HIGH STREET, SANTA CRUZ, CA 95064<div>916-749-2940</div></div></div>
</div>