I was wondering if there is a quick way to have, in a 2D plot, the x-axis oriented vertically, from top to bottom. I am looking for the Matlab equivalent of
set(gca,'view',[90,90])
if any.
The only solution I found is How can I rotate a matplotlib plot through 90 degrees? but I cannot make in work because I have several plots on the figure
One way you could accomplish this is just to swap the X, Y values you pass to the function. For example, if you have lists of X values and Y values (the points are (X[i], Y[i]), you could just do:
scatter(Y,X)
instead of
scatter(X,Y)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.