[yt-users] User defined fields

Matthew Turk matthewturk at gmail.com
Thu Apr 21 13:27:06 PDT 2011


Hi Mike,

On Thu, Apr 21, 2011 at 4:25 PM, Mike Butler <butler85 at astro.ufl.edu> wrote:
> Hi everyone,
>
> This is probably a dumb question, but is there an easier way to say,
> change the axis label of a Density projection from "Density (g/cm^2)" to
> the more accurate "Surface Density (g/cm^2)" or "\Sigma (g/cm^2)" besides
> adding a new field named that?  When you create a field you can specify
> projection units, but for Density the name stays as "Density", which
> causes confusion.  Creating a new field is easy enough, but it would be
> convenient if there was a simpler way.  If anyone has any suggestions they
> would be appreciated.

If you've done it in a plot collection and have the returned plot object:

p = pc.add_projection(...)
p.set_label("Dinosaur\/Density")

You may have to re-run the set_width command to manually redraw the
image, however.

-Matt

>
> Thanks,
>
> Mike
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>



More information about the yt-users mailing list