Making complex(ish) bar graphs?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Second question of the day, I have a single set of values on the y axis (in this case lengths from 10-20 "units), and then I have 4 different items I want on the x axis (preferably in different colors), and I want them to be grouped in pairs (for easy comparison). How would I go about doing this?
0 comentarios
Respuestas (1)
Grzegorz Knor
el 20 de Sept. de 2011
Something like this:
y = rand(4,1)*10+10;
bar([1,2],y(1:2),'r')
hold on
bar([3.5,4.5],y(3:4),'g')
set(gca,'xtick',[1 2 3.5 4.5],'xticklabel',{'A','B','C','D'})
ylabel('length [a.u.]')
?
See also:
0 comentarios
Ver también
Categorías
Más información sobre Annotations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!