Hi all! I'm a bit confused now, since I've never had any problems with 
bluemarble. The problems have always been in me and how I handle the data, and 
it probably is like that also this time... But the problem is that bluemarble 
won't show up, the data seems to plot just fine and so do for example 
drawcoastlines and drawcountries. Where should I dig into?

import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
from scipy.io.netcdf import netcdf_file as Dataset
import numpy as np
import pylab
import os

months = [3,45]

for month in months:

        SIT = Dataset('SIT.nc','r')
        
        lons = SIT.variables['lon'][:,:]
        lats = SIT.variables['lat'][:,:]

        masked_SIT = 
np.ma.masked_where(np.isnan(SIT.variables['sea_ice_thickness'][month,:,:] ), 
SIT.variables['sea_ice_thickness'][month,:,:] )
        
        m = 
Basemap(width=5400000*2,height=5400000*2,resolution='l',projection='laea',lat_0=90,lon_0=0)


        fig = plt.figure()
        m.pcolormesh(lons, lats, masked_SIT, latlon = True, vmin=0, vmax=5)
        m.bluemarble(scale=0.5)
        m.drawcoastlines()
        m.drawcountries()
        #m.fillcontinents(color='white')
        cbar = plt.colorbar()
        cbar.cmap.set_over('#ff0066')
        cbar.set_label('SIT [m]', fontsize='x-large')
        plt.title('Sea Ice Thickness %s' % (title), fontsize='x-large')

plt.show()


Cheers, Bill
                                          
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to