小编Dar*_*Ant的帖子

在PyPlot中反转Y轴

我有一个带有一堆随机x,y坐标的散点图.目前,Y轴从0开始并上升到最大值.我希望Y轴从最大值开始并上升到0.

points = [(10,5), (5,11), (24,13), (7,8)]    
x_arr = []
y_arr = []
for x,y in points:
    x_arr.append(x)
    y_arr.append(y)
plt.scatter(x_arr,y_arr)
Run Code Online (Sandbox Code Playgroud)

python matplotlib

234
推荐指数
7
解决办法
24万
查看次数

标签 统计

matplotlib ×1

python ×1