[yt-users] Set colors of bad values for a colormap?
Nathan Goldbaum
nathan12343 at gmail.com
Thu Jul 7 12:27:03 PDT 2016
Hi Yi-Hao,
The simplest way to do this right now is to create a custom colormap and
supply it to the set_cmap function. Here's an exmaple:
https://gist.github.com/anonymous/98bd8fcca8da5331f056e0a8ee53fb97
Hope that helps,
Nathan
On Thu, Jul 7, 2016 at 1:39 PM, Yi-Hao Chen <yihaochentw at gmail.com> wrote:
> Hi all,
>
> I have some projection plots that are displayed in log scale. However,
> some of the pixels have "0" values. The log10 of zero is -inf and yt
> displays them in white. I am looking for a way to set the color of those
> pixels. Does anyone know how to do it? Something similar to set_bad()
> <http://matplotlib.org/api/colors_api.html#matplotlib.colors.Colormap.set_bad>
> in matplotlib would be really helpful.
>
> Cheers,
> Yi-Hao Chen
>
> _______________________________________________
> 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/20160707/aa000d46/attachment.htm>
More information about the yt-users
mailing list