Re: [Matplotlib-users] How can I put a white area in the middle of colorbar showing the masked data?

2014-03-03 Thread Martin Mokrejs
Maybe I understand what he means. How can a user override some value in a colormap? Lets say, in general user wants to inherit some ready made colormap but in addition wants to force certain colors to some data items. M. Eric Firing wrote: On 2014/03/02 1:02 AM, ChaoYue wrote: Dear Eric, This

Re: [Matplotlib-users] How can I put a white area in the middle of colorbar showing the masked data?

2014-03-02 Thread ChaoYue
Dear Eric, This solved part of my problem. thanks a lot. I think I will revisit this issue when I have time (not promised). do you think this could be some feature desirable? Cheers, Chao On Sat, Mar 1, 2014 at 10:39 PM, Eric Firing [via matplotlib] ml-node+s1069221n42952...@n5.nabble.com

Re: [Matplotlib-users] How can I put a white area in the middle of colorbar showing the masked data?

2014-03-02 Thread Eric Firing
On 2014/03/02 1:02 AM, ChaoYue wrote: Dear Eric, This solved part of my problem. thanks a lot. I think I will revisit this issue when I have time (not promised). do you think this could be some feature desirable? I don't understand what feature you are referring to; evidently I don't

Re: [Matplotlib-users] How can I put a white area in the middle of colorbar showing the masked data?

2014-03-01 Thread Chao YUE
sorry, the attached file may lack surfix type, here is the correct one. Cheers, chao On Sat, Mar 1, 2014 at 8:57 PM, Chao YUE chaoyue...@gmail.com wrote: Dear all, In many cases in geoscience mapping we want to show the some missing values as some special color in the colorbar. like

Re: [Matplotlib-users] How can I put a white area in the middle of colorbar showing the masked data?

2014-03-01 Thread Eric Firing
On 2014/03/01 9:57 AM, Chao YUE wrote: Dear all, In many cases in geoscience mapping we want to show the some missing values as some special color in the colorbar. like attached one. I know there is one method in matplotlib colormap called set_bad, official docs says: Set color to be used

Re: [Matplotlib-users] How can I put a white area in the middle of colorbar showing the masked data?

2014-03-01 Thread ChaoYue
Hi Eric, thanks for answering. I updated the attached figure. The idea is, we want to show the tree cover difference, but to make the negative and positive values very contrastive, we would like to assign the values falling in small range of change (in the figure, it's -1 to 1) as blank (or

Re: [Matplotlib-users] How can I put a white area in the middle of colorbar showing the masked data?

2014-03-01 Thread Eric Firing
On 2014/03/01 11:03 AM, ChaoYue wrote: The most correct way might be to design a new colormap with white color exactly in the middle, however this is very tedious, especially if I want to try different colormaps. so the alternative approach would be to set the values falling in (-1,1) as