[yt-users] Non-log scale for colorbars

Nathan Roth nathaniel.roth at berkeley.edu
Fri Jul 2 17:53:34 PDT 2010


Hi Jeff,

  That worked perfectly. The color gradient is now being computed based on a
linear scale, and the problem of field values that are exactly zero showing
up as white has been fixed.

Best,
Nathan

On Fri, Jul 2, 2010 at 5:44 PM, j s oishi <jsoishi at gmail.com> wrote:

> Hi Nathan,
>
> This is unfortunately a bit more difficult than it should be. I don't
> know what kind of plot you're making, but assuming it's a slice or
> projection, you should be able to do something like this:
>
> pc = PlotCollection(pf)
>
> p = pc.add_slice("Density",0)
> p.set_log_field(False)
>
> You can also iteratively access all plots in a plot collection via
>
> pc.plots
>
> which is a list of of plots. Let me know if this works for you.
>
> j
>
> On Fri, Jul 2, 2010 at 5:38 PM, Nathan Roth <nathaniel.roth at berkeley.edu>
> wrote:
> > Hi,
> >
> >   I'd like to be able to set up my color bar so that it chooses the
> velocity
> > gradient based on a linear, and not a log, scale. One of the reasons I
> would
> > like to do this is to address the fact that yt plots white space on my
> slice
> > whenever the field I am plotting is exactly zero. Also, this will help me
> > compare my results to those performed by another code.
> >
> >   How can I do this?
> >
> >   Thanks,
> >   Nathan
> > _______________________________________________
> > yt-users mailing list
> > yt-users at lists.spacepope.org
> > http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >
> >
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20100702/65e569b6/attachment.html>


More information about the yt-users mailing list