[gradsusr] pygrads and colormap/colorbar

Francesco Benincasa francesco.benincasa at bsc.es
Wed Jan 12 05:25:14 EST 2011


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.

Any suggestions?
Thanks in advance.

P.S.: I'd also like to ask if it's possible to draw a map with a higher definition,
similar to the one drawed by the standard grads binary.
    
-- 
| Francesco Benincasa



More information about the gradsusr mailing list