import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0.05,10,1000)
y = np.random.rand(1000)
plt.scatter(x,y,label="scatter figure")
plt.legend()
plt.xlim(1,10)
plt.ylim(0,1)
plt.show()
数据可视化之matplotlib实战:plt.xlim() ylim()函数 设置x轴y轴范围坐标
最新推荐文章于 2024-07-06 02:49:59 发布