python - Reverse Y-Axis in PyPlot -
i have scatter plot graph bunch of random x, y coordinates. y-axis starts @ 0 , goes max value. y-axis start @ max value , go 0.
points = [(10,5), (5,11), (24,13), (7,8)] x_arr = [] y_arr = [] x,y in points: x_arr.append(x) y_arr.append(y) plt.scatter(x_arr,y_arr)
there new api makes simpler.
plt.gca().invert_xaxis()
and/or
plt.gca().invert_yaxis()
Comments
Post a Comment