Code covered by the BSD License  

Highlights from
REFLINEXY

4.0

4.0 | 1 rating Rate this file 7 Downloads (last 30 days) File Size: 2.94 KB File ID: #14706
image thumbnail

REFLINEXY

by Jos (10584)

 

18 Apr 2007 (Updated 19 Apr 2007)

Plot vertical and horizontal reference lines

| Watch this File

File Information
Description

REFLINEXY(X,Y) plots vertical and horizontal reference lines. The vertical set of lines are drawn from the bottom of the axes up to each point Y at the positions X. The horizontal set of lines are drawn from the left of the axes to each point X at the positions Y.
  REFLINEXY(X,Y,XOFFSET) uses the value XOFFSET as the vertical offset for the vertical lines. REFLINE(X,Y,XOFFSET,YOFFSET) uses the value YOFFSET as the horizontal offset for the horizontal lines. If the offsets are omitted, or if they are empty, the defaults are used, namely the bottom and/or the left side of the axis, respectively. The offsets can be specified for each point separately.
  The lines are plotted as a two graphics object. H = XYREFLINE(..) returns the two graphics handles of the vertical and horizontal line objects.
  REFLINEXY(..., 'Prop1','Val1','Prop2','Val2', ...) uses the properties and values specified for color, linestyle, etc. Execute GET(H), where H is a line handle, to see a list of line object properties and their current values. Execute SET(H) to see a list of line object properties and legal property values.
  REFLINEXY uses the current axes, if any. Lines outside the plot area are plotted but not shown.

  Examples
     % some data
       N = 1000 ; i=0:N ;
       x = (i/N) * 4 * pi ; y = exp(i/N) .* sin(x) ;
       plot(x,y,'b-') ;
     % add specific reference lines
       i0 = [100 400 600] ;
       reflinexy(x(i0),y(i0),'color','r') ;
     % other reference lines with a specific offset
       h = reflinexy(1:14,linspace(-2,1.5,14),[],x(end)-2) ;
       set(h,'color','g','linestyle','-','linewidth',3) ;
 
  See also STEM, PLOT, REFLINE, GRID, AXES
  and GRIDXY (on the FEX)

http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=9973&objectType=FILE

version 1.2 (april 19th, 2007)

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
GRIDXY (v2.2 feb 2008)

MATLAB release MATLAB 6.5 (R13)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
18 Apr 2007 Rick Barnes

I had to replace hxy with hxy(:) in line 139 to get it to work

19 Apr 2007 Jos (the author)

Thanks Rick. Apparently the Mathworks has changed something in UISTACK since R13 ... I will update the file shortly.

Please login to add a comment or rating.
Updates
19 Apr 2007

Changed input to uistack into column vector. Added warning message identifier.

Tag Activity for this File
Tag Applied By Date/Time
annotation Jos (10584) 22 Oct 2008 09:09:53
customization Jos (10584) 22 Oct 2008 09:09:53
reference line Jos (10584) 22 Oct 2008 09:09:53
grid Jos (10584) 22 Oct 2008 09:09:53
mark Jos (10584) 22 Oct 2008 09:09:53
plot Jos (10584) 22 Oct 2008 09:09:53

Contact us at files@mathworks.com