Code covered by the BSD License  

Highlights from
PLOT2ORG

Be the first to rate this file! 1 Download (last 30 days) File Size: 2.13 KB File ID: #11337
image thumbnail

PLOT2ORG

by Jos (10584)

 

07 Jun 2006 (Updated 12 Jun 2006)

scatter plot with connecting lines to origin

| Watch this File

File Information
Description

PLOT2ORG(X,Y) creates a scatter plot of Y vs. X in which each point is connected to the origin (0,0). X and Y should be equal length vectors.
     PLOT2ORG(X,Y,[X0 Y0]) in which X0 and Y0 are scalars connects each point to the origin specified by (X0,Y0).
 
     PLOT2ORG(...,'LineSpec') uses the color, marker and linestyle properties specified by the string LineSpec. See PLOT for possibilities.
 
     H = PLOT2ORG(...) returns a two-element vector with a handle to the scatter points and a handle to the connecting lines.
     
     Example:
       % the data
       x = 10*rand(10,1)-5 ;
       y = 10*rand(10,1)-5 ;
       plot2org(x,y,'go-') ;
       hold on ;
       plot2org(x,y,[mean(x) mean(y)],'r.:')
 
     See also PLOT, SCATTER, ERRORBAR
     and XYREFLINE (Matlab File Exchange)

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)
09 Jun 2006 John D'Errico

A minor oops, if you do NOT specify a marker symbol, you get some extraneous lines.

plot2org(randn(10,1),randn(10,1),'r:')

09 Jun 2006 Jos vdG

Thanks John. The update is on it's way.

Please login to add a comment or rating.
Updates
09 Jun 2006

removed some spelling errors

12 Jun 2006

fixed problem when no symbol was given (thanks John)

Tag Activity for this File
Tag Applied By Date/Time
specialized Jos (10584) 22 Oct 2008 08:28:13
plotting Jos (10584) 22 Oct 2008 08:28:13
plot origin scatter lines connect Jos (10584) 22 Oct 2008 08:28:13

Contact us at files@mathworks.com