<div dir="ltr">Hi Nathan,<div><br></div><div>I did not know that set_cmap can also take a colormap object from matplotlib. This is very helpful.</div><div><br></div><div>Thanks! </div><div>Yi-Hao<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 7, 2016 at 2:27 PM, Nathan Goldbaum <span dir="ltr"><<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</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">Hi Yi-Hao,<div><br></div><div>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:</div><div><br></div><div><a href="https://gist.github.com/anonymous/98bd8fcca8da5331f056e0a8ee53fb97" target="_blank">https://gist.github.com/anonymous/98bd8fcca8da5331f056e0a8ee53fb97</a><br></div><div><br></div><div>Hope that helps,</div><div><br></div><div>Nathan</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Thu, Jul 7, 2016 at 1:39 PM, Yi-Hao Chen <span dir="ltr"><<a href="mailto:yihaochentw@gmail.com" target="_blank">yihaochentw@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi all,<br><div data-smartmail="gmail_signature"><div dir="ltr"><br></div><div>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 <a href="http://matplotlib.org/api/colors_api.html#matplotlib.colors.Colormap.set_bad" target="_blank">set_bad()</a> in matplotlib would be really helpful.<br><br></div><div>Cheers,<br></div><div>Yi-Hao Chen<code></code></div></div><div>
</div></div>
<br></div></div>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">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/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<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/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>