Rotate and Swap Axis in Matlab Plots

May, 2010

So, if you would like to rotate / invert a figure or plot in Matlab by 90 degrees or by any other specified amount, it is very easy. Simply use:

>> view(90,90)

...and you can go from this: this:

I wasted over a half an hour trying to find out this simple solution. After sifting through a multitude of poor documentation, blog posts, and forum threads, I ended up figuring it out on my own. I would like to say that there are many other ways to achieve this, but this is probably the easiest. Thought I would share with the Internet.