[gradsusr] pygrads and colormap/colorbar

Arlindo da Silva dasilva at alum.mit.edu
Wed Jan 12 21:14:59 EST 2011


On Wed, Jan 12, 2011 at 5:25 AM, Francesco Benincasa <
francesco.benincasa at bsc.es> wrote:

> Hi all,
>
> I'm using python grads library to generate maps from netcdf files.
>
> Now, I generate a colorbar using matplotlib.colors.ListedColormap()
> and a colormap using matplotlib.colorbar.ColorbarBase()
>
> then i generate the map with ga.contourf() function, passing it both the
> colormap and colorbar (for passing the colobar I've done a little
> modification to galab.py code to override its default colorbar and pass
> mine).
>
> The problem is that I want to display the variable in µg/m^3, while it's in
> kg/m^3. With the standard grads it was sufficient to do "d
> VARNAME*1000000000", but now it seems impossible to do it.
>
>
You should be able to enter

     ga.contourf("varname*10000000")

What exactly is the problem you are having?

    Arlindo


-- 
Arlindo da Silva
dasilva at alum.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110112/f0cb01b7/attachment-0003.html 


More information about the gradsusr mailing list