I have a colorbar that I created for a heatmap image of surface temperature on Earth. The problem that I'm having is that the pyplot figure saves with a white background and I have the Earth image on a black background. I set the figure image to be transparent and need to change the text and ticks on the axes to be white.
I've tried everything I've seen on here and searched for hours on the matplotlib site but nothing seems to work for something as simple as changing text color.
a = np.array([[319.785, 198.988]])
plt.figure(figsize=(7, 1))
img = plt.imshow(a)
plt.gca().set_visible(False)
cax = plt.axes([0, .3, 1, 0.5])
cb = plt.colorbar(orientation='horizontal', cax=cax)
plt.savefig("colorbar.png", bbox_inches='tight', transparent=True)
plt.show()
