What is the color spec for default blue?
146 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
i.e. this blue:
----
I tried:
c = repelem([0 0.4470 0.7410],length(X),1);
%scatter(X,Y,c)
scatter(X,Y,[0 0.4470 0.7410])
but if fails with message:
Error using scatter (line 76)
S must be a scalar or a vector of the same length as X.
Error in scaling_experiment_loss_vs_gen_errosr_normalization (line 65)
scatter(X,Y,[0 0.4470 0.7410])
0 comentarios
Respuestas (3)
Jan
el 15 de Jul. de 2018
Editada: Jan
el 15 de Jul. de 2018
It depends on what you call "color spec".
figure,
axes;
LineH = plot(rand(1, 10), 'o')
get(LineH, 'Color')
>> [0 0.4470 0.7410]
Or maybe you mean:
plot(1:10, rand(1, 10), 'b')
^^^
? If this does not help, please edit the question and add more details.
3 comentarios
Image Analyst
el 15 de Jul. de 2018
You can get all the default colors like this:
% Get the initial set of default plot colors.
initialColorOrder = get(gca,'ColorOrder') % Initial
You can change that order, and my attached demo shows you how.
0 comentarios
Ver también
Categorías
Más información sobre Discrete Data Plots 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!