Ok! I'm getting there! I've been trying to figure out, though, how to set
black - for example - for the zero values BUT interpolate also the colors
linearly from black to blue in the linear region (from zero to the linear
threshold). Is there a way to change the colormap like that?
Thanks a lot!
On 2014/06/18, 5:23 AM, Bruno Pace wrote:
> Ok, so using the norm=SymLogNorm I cannot distinguish the values that
> are exactly 0.0 from the really small ones, right? Would it be possible
>
Correct, the scale is linear for small values.
to make use of the set_bad method without having to use masked arrays,
> just combining the SymLogNorm and the set_bad?
>
No, the mask is what identifies a point as bad. If you want to distinguish
zero from non-zero, no matter how small, then this is the way to do it.
zm = np.ma.masked_equal(z, 0, copy=False)
Now you have a masked array where the points that are exactly zero are
masked.
The bad color won't show up on the colorbar, however. There is no suitable
place for it. It can show only the range from vmin to vmax, and a
"set_over" color for values greater than vmax, and a "set_under" color for
values less than vmin.
Eric
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users