import matplotlib.pyplot as plt
import pandas as pd
data=pd.read_csv("kc_train.csv")
Z = data['销售价格'].values
X = data['经度']
Y = data['纬度']
plt.scatter(X, Y, c=Z, alpha=0.3,cmap='Greys')
plt.colorbar(); # 显示颜色条
plt.show()
颜色越深值越高.png
image.png
网友评论