How To Increase Contrast When Plotting A Netcdf Using Imshow In Matplotlib?
Is there a way to increase contrast when plotting data (from a netcdf) using imshow? In ArcMap this can be done using the 'stretch' function but I would like a solution using matp
Solution 1:
Try two arguments of the imshow
function:
plt.imshow(mydata, cmap = 'YlGn, interpolation = 'sinc', vmin = 0, vmax = 0.1)
The documentations:
https://matplotlib.org/gallery/images_contours_and_fields/interpolation_methods.html https://matplotlib.org/api/_as_gen/matplotlib.pyplot.imshow.html
Post a Comment for "How To Increase Contrast When Plotting A Netcdf Using Imshow In Matplotlib?"