I have been trying to create a colormap that looks something like this:
I have been using this code:
import numpy as np
import matplotlib.pyplot as plt
y= np.log10(split1)#np.linspace(np.log10(min(dok2)),np.log10(max(dok2[dok2<1e8])),bins1)
x= ind_pvi#np.linspace(np.log10(min(dok)),np.log10(max(dok)),steps)
xx, yy = np.meshgrid(x, y)
z = relative1
plt.imshow(z, interpolation='nearest',cmap=plt.cm.jet, extent=[np.log10(min(ind_pvi)),np.log10(max(ind_pvi)),np.log10(min(split1)),np.log10(max(split1))])
plt.colorbar()
plt.show()
from mpl_toolkits.mplot3d import Axes3D
ax = Axes3D(plt.figure())
ax.plot_surface(xx,yy, z, cmap=plt.cm.jet, cstride=1, rstride=1)
plt.show()
Up until now, I managed to do this:
So I would like to renormalize the color bar to look something like the first figure.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…