On 2015/05/23 8:49 AM, Matteo Niccoli wrote: > Hi Eric > > If you look at the two attached images, both have the shading as expected, > but in one case the colours have changed, from the cubehelix colors, to > rainbow colors.
Yes, the result looks more like a rainbow set, but that doesn't mean anything is incorrect. The algorithm is doing what you are telling it to do. The "alter V" algorithm will *always* generate colors that are outside the original colormap. It happens that superimposing wild variations in V on something mapped with cubehelix yields a result that looks more rainbow-ish than if you started with some other map. This is just because of the character of cubehelix. It doesn't mean the code is failing--it means the algorithm is not the right one for the result you want to achieve, or cubehelix is not a good choice for the result you want, or both. You might get something more to your liking if you were to start with a colormap in which V is uniform--all variation is in H and S--and then impose the shading on the V. Cubehelix starts with a full range of V, so replacing V with your shading channel completely changes the set of colors you end up with. Eric > > Matteo > > On Sat, May 23, 2015 2:19 pm, Eric Firing wrote: >> On 2015/05/22 9:33 AM, Matteo Niccoli wrote: >> >>> The second method suggested by titusjan replaces value in hsv space >>> with intensity as suggested. Eric you will notce I did include the line >>> img_array = plt.get_cmap('cubehelix')(data_n) and yet the colormapping >>> is not working. >> >> I don't understand your conclusion that the colormapping is not working. >> I don't see anything wrong with any of these plots. The two >> algorithms appear to be doing exactly what they are supposed to do. >> >> Eric >> >> >> ------------------------------------------------------------------------- >> ----- >> One dashboard for servers and applications across Physical-Virtual-Cloud >> Widest out-of-the-box monitoring support with 50+ applications >> Performance metrics, stats and reports that give you Actionable Insights >> Deep dive visibility with transaction tracing using APM Insight. >> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y >> _______________________________________________ >> Matplotlib-users mailing list >> Matplotlib-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users