Plotting multipe lines with different width
Ältere Kommentare anzeigen
I have 5000 lines with their endpoints coordinnates. I want to plot all these lines in one figure, but each line will have a different width. With a for loop (see code), it is taking forever to execute. Ia m wondering if there is a better way to do this. Thanks.
A =[X1(:) X2(:)].'; B =[Y1(:) Y2(:)].';% Line endpoints
width=round((width*5)/(max(width)))% Vector giving each line thickness
figure;hold on
for i=1:length(A);
plot(A,B,'LineWidth',width(i));
end
grid on
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Operators and Elementary Operations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!