Tuesday, May 18, 2010

Rotating a Figure or Plot in Matlab

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:


...to this:


Normally I would not post such a simple tutorial on my blog, however 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, and I was aware of most of them. I just wanted to know the easiest way and now hopefully the internet finds this useful as well.