<div dir="ltr"><div><div>Thanks Vaclav,<br><br></div>Will see if I can figure out.<br><br></div>Steve<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 1, 2017 at 8:51 PM, Vaclav Petras <span dir="ltr"><<a href="mailto:wenzeslaus@gmail.com" target="_blank">wenzeslaus@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"><div class="gmail_extra">Hi Steve,<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 30, 2017 at 3:10 PM, Steven Pawley <span dir="ltr"><<a href="mailto:dr.stevenpawley@gmail.com" target="_blank">dr.stevenpawley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div><div><br></div>Thanks for writing the r.colors.matplotlib tools because I use the matplotlib colorramps very frequently both in GRASS and in python more generally.<br></div></div></div></blockquote><div><br></div><div>Glad to hear that.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div><br></div>I seem to be having a problem of using the perceptually uniform ramps in the r.colors.matplotlib add on, receiving the error: ERROR: Matplotlib 2.0.2 does not contain color table <plasma><br><br></div>I'm on linux and matplotlib 2.0.2 has the perceptually uniform ramps, and I can use them if I display data in python within a GRASS session directly (i.e. plt.imshow(numpyraster, cmap='plasma').<br><br></div>Is there a reason why r.colors.matplotlib can't see these ramps? It still works with all of the traditional matplotlib ramps.</blockquote></div><br></div><div class="gmail_extra">The module does not check for specific color maps in mpl, but it uses general code to check the presence of a requested color map. It imports <span class="m_-4352973594692969144gmail-nn"><a href="http://matplotlib.cm" target="_blank">matplotlib.cm</a></span>.datad dictionary. Perhaps, this <span class="m_-4352973594692969144gmail-nn"></span>dictionary does not contain the new color maps. The checking is not ideal, it should based on cm.get_map() function. I think the reason why I "ask for permission" here instead is that I was not able to figure out what is the error state from get_map() or how to transfer it to the user. But perhaps you will be more successful or 2.0 behaves differently. The relevant code is here:<br></div><div class="gmail_extra"><br><a href="https://trac.osgeo.org/grass/browser/grass-addons/grass7/raster/r.colors.matplotlib/r.colors.matplotlib.py#L164" target="_blank">https://trac.osgeo.org/grass/<wbr>browser/grass-addons/grass7/<wbr>raster/r.colors.matplotlib/r.<wbr>colors.matplotlib.py#L164</a><br><br></div><div class="gmail_extra">Best,<br></div><div class="gmail_extra">Vaclav<br></div></div>
</blockquote></div><br></div>