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

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -