<div dir="ltr">It's likely possible to make it so yt automatically imports the colormaps from these packages if they're installed. We currently do that for colormaps from cmocean and palettable if they are installed in the same python environment as yt. You can see how that works for cmocean right here:<div><br></div><div><a href="https://github.com/yt-project/yt/blob/master/yt/visualization/color_maps.py#L160">https://github.com/yt-project/yt/blob/master/yt/visualization/color_maps.py#L160</a><br></div><div><br></div><div>I'd +1 a pull request that did something similar for the packages you suggested.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 26, 2017 at 9:57 AM, Kacper Kowalik <span dir="ltr"><<a href="mailto:xarthisius.kk@gmail.com" target="_blank">xarthisius.kk@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 class="HOEnZb"><div class="h5">On 07/26/2017 09:35 AM, Joseph Smidt wrote:<br>
> Hey everyone,<br>
><br>
>     This repo has some perceptually uniform colormaps that are not in<br>
> standard matplotlib/yt. [1] More info here[2]<br>
><br>
> Anyway, it is not clear to me from his documentation how I might import<br>
> these colormaps in a way I could use with YT.  Does anyone have an idea<br>
> how that can be done? They seem to be a set of .csv files.   Thanks.<br>
><br>
> [1] <a href="https://github.com/bokeh/colorcet" rel="noreferrer" target="_blank">https://github.com/bokeh/<wbr>colorcet</a><br>
><br>
> [2] <a href="http://peterkovesi.com/projects/colourmaps/" rel="noreferrer" target="_blank">http://peterkovesi.com/<wbr>projects/colourmaps/</a><br>
<br>
</div></div>Hi,<br>
yt uses matplotlib (in most cases) for plotting. Just install colorcet<br>
as shown in [1]. Then:<br>
<br>
import yt<br>
import colorcet as cc<br>
<br>
ds = yt.load('IsolatedGalaxy/<wbr>galaxy0030/galaxy0030')<br>
slc = yt.SlicePlot(ds, 'z', 'density')<br>
slc.set_cmap('density', cc.m_fire)<br>
# alternatively<br>
slc.set_cmap('density', <a href="http://cc.cm" rel="noreferrer" target="_blank">cc.cm</a>['fire'])<br>
slc.save()<br>
<br>
As described in the notebook also in [1].<br>
<br>
New colormaps can be also added via:<br>
<br>
yt.visualization.color_maps.<wbr>add_cmap('cc_fire', cc.fire)<br>
<br>
Cheers,<br>
Kacper<br>
<br>
<br>
><br>
> ______________________________<wbr>_________________<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/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
><br>
<br>
<br>
<br>______________________________<wbr>_________________<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/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
<br></blockquote></div><br></div>