Code covered by the BSD License  

Highlights from
FLIPXYVIEW (v2.0, mar 2010)

5.0

5.0 | 1 rating Rate this file 4 Downloads (last 30 days) File Size: 2 KB File ID: #26983
image thumbnail

FLIPXYVIEW (v2.0, mar 2010)

by Jos (10584)

 

17 Mar 2010

flips (mirror rotates) the horizontal and vertical plot axes

| Watch this File

File Information
Description

FLIPXYVIEW sets the view of the current 2D axes in such a way that the x and y axis interchange positions. The current horizontal axis will become the vertical axis, and vice versa.

FLIPXYVIEW (AX) rotates the axes specified by the handle AX.

Note that this function only changes the view and not the x and y values of the plotted points. Applying this function twice will undo the flip.
 
Example 1: See screenshot
 
Example 2: Create a errorbar plot, with horizontal error bars

      y = 1:5 ; x = polyval([2 3 4],y) ;
      xerr = 5*rand(size(x)) ; % Errors in X
      subplot(2,2,3) ; errorbar(y,x,xerr,'bo') ;
      xlabel('Y') ; ylabel('X') ; % !! note the names
      flipxyview

MATLAB release MATLAB 7.6 (R2008a)
Other requirements should work on most ML releases
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
17 Mar 2010 Anon

Neat! I always thought there should be a built-in function such as "axis flip".

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
plot Jos (10584) 17 Mar 2010 10:54:51
axes Jos (10584) 17 Mar 2010 10:54:51
flip Jos (10584) 17 Mar 2010 10:54:51
rotate Jos (10584) 17 Mar 2010 10:54:51
mirror Jos (10584) 17 Mar 2010 10:54:51
horizontal Jos (10584) 17 Mar 2010 10:54:51
vertical Jos (10584) 17 Mar 2010 10:54:51
swap Jos (10584) 17 Mar 2010 10:54:51
axis Jos (10584) 17 Mar 2010 10:54:51
2d Jos (10584) 17 Mar 2010 10:54:51
figure Jos (10584) 17 Mar 2010 10:54:51
graphics Jos (10584) 17 Mar 2010 10:54:51
rotate Jose Ercolino 13 Jun 2011 19:47:50
swap Jose Ercolino 13 Jun 2011 19:48:07
graphics Jose Ercolino 13 Jun 2011 19:48:14
plot Jose Ercolino 13 Jun 2011 19:48:14
axes Jose Ercolino 13 Jun 2011 19:48:14

Contact us at files@mathworks.com