0

can you tell me is it possible to make this gradient image in python for example with matplotlib contour plot (like the image of the centre of our galaxy?1

1 Answers1

0

You can use a custom colormap using LinearSegmentedColormap, see this answer

import matplotlib.pyplot as plt
import matplotlib.colors
cmap = matplotlib.colors.LinearSegmentedColormap.from_list("", ["black","red","white"])
plt.imshow(img, cmap = cmap)
endive1783
  • 827
  • 1
  • 8
  • 18