我有一个hexbin图,但是如何在这个图中添加其他点(例如两个点(x1,y1))???
谢谢
x=log(PR)
y=log(CR)
xmin = x.min()
xmax = x.max()
ymin = y.min()
ymax = y.max()
x1=log(np.array([10,20]))
y1=log(np.array([10,20]))
plt.hexbin(x1, y1, bins='log',color='red')
plt.hexbin(x, y, bins='log', cmap=plt.cm.gist_ncar)
plt.axis([xmin, xmax, ymin, ymax])
plt.title("With a log color scale")
cb = plt.colorbar()
cb.set_label('log10(N)')
plt.show()
有几种方法,这取决于你想画什么。一些例子:
相关问题 更多 >
编程相关推荐