I am plotting figure as:
plt.imshow(image, cmap='gray', interpolation='none')
plt.imshow(masked_contour, cmap='cool', interpolation='none', alpha=0.7)
plt.show()
The figure shows in greyscale with a blue contour inside it.
Now I want to get this figure as a numpy
array (also not as a masked array). One way can be, save the plot as an image, then read it from there. Is there any better approach?