<div dir="ltr"><div>Off the top of my head, I wonder if you can set the colormap after the fact on the image and then create the colorbar. The colorbar is going to assume whatever colormap was set, and the default is viridis. The problem is that I don't think a colormap is set on the image when RGB data is passed in (so, it'll be None), which then means that colorbar falls back on the default from the system, which is usually viridis. If you call `im.set_cmap('NameOfYourColormap')`, and then call colorbar(), I think that'll work.</div><div><br></div><div>Ben Root</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 3, 2018 at 5:14 PM, Bruno Pagani <span dir="ltr"><<a href="mailto:bruno.pagani@astrophysics.eu" target="_blank">bruno.pagani@astrophysics.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Le 03/08/2018 à 23:09, Benjamin Root a écrit :<br>
> I think the issue is that the user is passing in an RGB array, but<br>
> wants a colormap that matches that array. That is a bit tricky. Do I<br>
> have my understanding correct?<br>
><br>
> Ben<br>
<br>
</span>Exactly what I understood too. So do you have a solution for this? I’ve<br>
stackoverflow’d that question a bit, nothing cames out.<br>
<span class="HOEnZb"><font color="#888888"><br>
Bruno<br>
</font></span></blockquote></div><br></div>