hold all vs. hold on
15 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
If I use hold all when I have multiple plot functions, the colormap looks smooth and easy on eye. However, if I use hold on and specify the line colors for each plot function (i.e. '-b', '-g' etc.), the colors look too bright and harsh on eye.
I think hold all uses a different colormap but I haven't been able to incorporate this coloring to individual color setting as mentioned above.
How can I change the colormap when I choose to define the line color for each plot as in the example below? Thanks.
plot(x1,y1, '-sg', 'LineWidth', 2); plot(x2,y2, '-sb', 'LineWidth', 2); plot(x3,y3, '-sr', 'LineWidth', 2);
0 comentarios
Respuestas (1)
Laura Proctor
el 13 de Dic. de 2011
You can find the colors used for hold all by issuing the command
get(gca,'ColorOrder')
which returns:
0 0 1.0000
0 0.5000 0
1.0000 0 0
0 0.7500 0.7500
0.7500 0 0.7500
0.7500 0.7500 0
0.2500 0.2500 0.2500
They may be different than the colors used by the alphabetic code.
The green is different. To use the green from hold all:
plot(1:10,'Color',[0 0.5 0])
2 comentarios
Ver también
Categorías
Más información sobre Orange en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!