Thank you so much Ben,
Now the plot comes correctly after trying your suggestion.
 I set  *cmap.set_under() and cmap.set_over()* before calling contourf() and
now the plot comes correctly irrespective of cal to the colorbar() function.

Thanks,
Bala

On Thu, Oct 14, 2010 at 5:09 PM, Benjamin Root <ben.r...@ou.edu> wrote:

> On Thu, Oct 14, 2010 at 9:50 AM, Bala subramanian <
> bala.biophys...@gmail.com> wrote:
>
>> Dear Ben,
>> you are right, contouf() omits the red and blue values without colorbar.
>>
>> 1) If i call set_under() and set_over() before calling contourf(), i get
>> an error. This is obvious because i am setting a property of the countourf()
>> object before creating it. I get *NameError: name 'CNF' is not defined*
>>
>> 2) If i set set_under() and set_over(), after the colorbar(), the
>> colorbar() is shown correctly but contourf() again dose not create the red
>> and blue values. I have also attached my test matrix file with this mail.
>>
>> Bala
>>
>>
> Bala, in the code example you gave, you have a cmap object that you pass
> into contourf.  The cmap object that you are accessing after contourf is
> exactly the same object, so why not just call "cmap.set_over()" before the
> contourf()?
>
> Ben Root
>
>
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to