Rearrange x & y Axis in Matlab

A potentially simple matrix question, but I was looking and can't figure out how to do this.

I have variables that look like this: Example

I just want the x axis to be the y axis and vice versa. How can I change them?

Thank you in advance for your help!

+4
source share
1 answer

The standard way would be to exchange the arguments passed to plot:

plot(ydata, xdata) %// instead of plot(xdata, ydata)

Otherwise, you can change the view to rotate the axes:

view([90 -90]) %// instead of normal view, which is view([0 90])
+8
source

Source: https://habr.com/ru/post/1583877/


All Articles