1

Actually plotting this image using plt.imshow and np.masked to plot the figure in blue. I would like to remove the inner part of the figure and just leaving the border. Tried with fill=False but that's not an arg for plt.imshow.

Code:

#img comes from a raster using GDAL

img = np.dstack((band1, band2, band3))
max = img.max()
img = img / max
one = f.add_subplot(1, 2, 1)
one.set_title('Polygon ID: '+index)
plt.imshow(img, cmap=plt.cm.binary)
plt.imshow(masked_polygon, 'jet', interpolation='none', alpha=0.3)
plt.axis('off')

Result of plot:

Resulting plot

Matt Hall
  • 7,614
  • 1
  • 23
  • 36

0 Answers0