Plot issue (maybe using set and gca)
Ältere Kommentare anzeigen
Hey guys, here is the code that I have:
stem(Tim,Var1,'MarkerSize',0,'Color','k'); hold on;
stem(Tim,Var2,'MarkerSize',0,'Color','g');
stem(Tim,Var3,'MarkerSize',0,'Color','r'); hold off;
datetick('x','mm/dd');
set(gca,'YTickLabel',{0; 1; 2; 3;})
So for a specific length of time, Var1 = 1, Var2 = 2, Var3 = 3. I expect my Y axis to represent this, and the stem for each Var should rise to the associated value.
However, when I plot, this is not the case. Here is what actually happens:
Any help or advice on this issue would be much appreciated!
EDIT*** For this plot's time period, Var2 should be the only one showing.
6 Kommentare
Sarah
am 5 Mai 2012
Oleg Komarov
am 5 Mai 2012
You're using the same Tim for all stems.
Sarah
am 5 Mai 2012
Oleg Komarov
am 5 Mai 2012
Var2 is 2 in your example and Var3 is 3, how then Var2 should be the only one appearing. Also, I cannot reproduce what you show on the picture. If you want meaningful answers give more details about your problem and what you want to achieve.
Sarah
am 5 Mai 2012
Sarah
am 5 Mai 2012
Antworten (1)
Sarah
am 5 Mai 2012
0 Stimmen
Kategorien
Mehr zu Annotations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!