Skip to content Skip to sidebar Skip to footer

How To Remove Grey Boundary Lines In A Map When Plotting A Netcdf Using Imshow In Matplotlib?

Is it possible to remove the grey boundary lines around the in following map? I am trying to plotting a netcdf using matplotlib. from netCDF4 import Dataset # clarify use of Datase

Solution 1:

Those gray boundaries are an interpolation artifact from imshow. To get rid of them, do:

imgplot = plt.imshow(mydata, cmap = 'YlGn', interpolation='none')

Or plot through Basemap and control drawing explicitly, as in this example.

Post a Comment for "How To Remove Grey Boundary Lines In A Map When Plotting A Netcdf Using Imshow In Matplotlib?"