Matlap plot- linspec features
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
plot(x,y,'-', 'color', cmap(jj,:));
Is there any way I can have matlab plot the data first and the use the linespec '-'?
0 Commenti
Risposte (1)
Steven Lord
il 30 Lug 2018
So you want to just call:
plot(x, y)
then change the plotted line to have a different line style or color? Call plot with an output, so you have a handle to the line, then change its properties.
x = 0:0.1:2*pi;
y = sin(x);
h = plot(x, y);
pause % So you can see how the plot looks before its properties change
h.Color = 'r';
0 Commenti
Vedere anche
Categorie
Scopri di più su Line Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!