plot_alpha

版本 1.0.0.0 (2.0 KB) 作者: R P
Linear plot with translucid lines. PLOT_ALPHA(X,Y) plots vector Y versus vector X using Matlab FILL.
299.0 次下载
更新时间 2012/1/29

查看许可证

Linear plot with translucid lines.

PLOT_ALPHA(X,Y) plots vector Y versus vector X using Matlab FILL.

Three methods are included:
1) 'fast' >> positive: one fill object with constant width, problem: holes
2) 'fast2' >> positive: one fill object without holes, problem: varying width
3) 'slow' >> positive: constant width, problem: multiple objects, holes and overlaps
A future update version of this function could include interpolation in 'fast' method (avoiding the holes) and width_X and width_Y (avoiding scale problems)...

SYNTAX:
plot_alpha(x,y,color,width,transparency,method)

EXAMPLE:
points=5; min=0; max=3; figure(1); hold on;
for i =1:3
plot_alpha( linspace(min,max,points) , rand(points,1)*(max-min)+min , [1 0 0] , 0.03 , 0.5 , 'fast' )
plot_alpha( linspace(min,max,points) , rand(points,1)*(max-min)+min , [0 0 1] , 0.03 , 0.5 , 'fast2')
plot_alpha( linspace(min,max,points) , rand(points,1)*(max-min)+min , [0 1 0] , 0.03 , 0.5 , 'slow' )
end
hold off; xlim([min max]);ylim([min max]); legend('fast','fast2','slow'); grid;

引用格式

R P (2024). plot_alpha (https://www.mathworks.com/matlabcentral/fileexchange/34831-plot_alpha), MATLAB Central File Exchange. 检索来源 .

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

Community Treasure Hunt

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

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