how to apply colors to bar chart.

2 visualizaciones (últimos 30 días)
ARYA NAYAK
ARYA NAYAK el 6 de En. de 2017
Comentada: Image Analyst el 6 de En. de 2017
x=[10,20,30] b=[20,29,32] a=uisetcolor('select color'); bar(x,y,a);
it shows input argument error.

Respuesta aceptada

Image Analyst
Image Analyst el 6 de En. de 2017
See my attached demo.
  2 comentarios
Image Analyst
Image Analyst el 6 de En. de 2017
ARYA's "Answer" moved here:
I want to choose the color from that option only. How to apply selected color
Image Analyst
Image Analyst el 6 de En. de 2017
I don't understand. Are you talking about my demo? It does ask you to choose a color scheme and does apply it.
If you want a single color for all bars, simply specify the 'FaceColor'
bar(x, y, 'FaceColor', 'r'); % Red bars.
bar(x, y, 'FaceColor', [0, 0.5, 0]); % Dark Green bars.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Bar Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by