PLOT2ORG

版本 1.0.0.0 (2.1 KB) 作者: Jos (10584)
scatter plot with connecting lines to origin
2.1K 次下载
更新时间 2006/6/12

查看许可证

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)

引用格式

Jos (10584) (2025). PLOT2ORG (https://ww2.mathworks.cn/matlabcentral/fileexchange/11337-plot2org), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R13
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Scatter Plots 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0

fixed problem when no symbol was given (thanks John)