How to plot specific graph
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
hello all
im trying to graph in a certain way and was hoping to learn how to do this. attatched is what im trying to do but not sure how to do it in matlab. thank you!!
0 commentaires
Réponse acceptée
Image Analyst
le 8 Sep 2012
x = 1:4;
y1 = [40 0 0 0];
y2 = [-28 0 0 0];
bar(x, y1, 'FaceColor', 'r');
hold on;
bar(x, y2, 'FaceColor', [.5 .5 .5]);
grid on;
2 commentaires
Image Analyst
le 8 Sep 2012
You can reset the tick labels to be anything you want, for example you could take the absolute value and write them back out as positive. Look up tick labels in the help for examples.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!