multicolor bar graph using long vectors
Mostrar comentarios más antiguos
Hello,
I am trying to create a bar graph with one vector of positive numbers and one vector of negative numbers on the same graph. For example:
x = 1:100;
y = -(1:100);
bar(x,'b')
hold on
bar(y,'r')
This works fine!!
The problem is my vectors are 1370 x 1 variables and the same code does not work for long vectors...
x = 1:1370;
y = -(1:1370);
bar(x,'b')
hold on
bar(y,'r')
This creates blue bars for x, but creates black bars for y. Can anyone help me with this problem?!
Thanks, Dan
Respuesta aceptada
Más respuestas (1)
Dan
el 29 de Nov. de 2011
0 votos
Categorías
Más información sobre App Building en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!