Missing One entry in Legend while using Plotyy function
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Aftab Ahmed Khan
am 21 Apr. 2015
Beantwortet: Star Strider
am 21 Apr. 2015
Hi everyone, I am plotting multiple graph using plotyy function. All the graphs are plotted but the legend section is not displaying the way i want to display it. Also there is one entry missing as well. I am doing it in this way. Any help guys?
[AX1,H1,H2]=plotyy(trafficstore,bpstore,trafficstore,throughputstore);
set(H1,'LineStyle','-','Marker','*','Color','r');
set(H2,'LineStyle','-','Marker','*','Color','b');
[AX2,H3,H4]=plotyy(trafficstore,erpbstore,trafficstore,yline);
set(get(AX1(1),'Ylabel'),'String','Blocking Probability Pb');
set(get(AX1(2),'Ylabel'),'String','System Throughput (Mbps)');
set(H3,'LineStyle','-','Marker','s','Color','k');
set(H4,'LineStyle','-','Marker','s','Color','c');
title('Blocking Probability & System Throughput vs Offered Traffic');
xlabel('Offered Traffic (Mbps)');
legend('System Blocking Probability','Erlang-B Model','System Throughput','Arbitary line','Location','NorthWest');
0 Kommentare
Akzeptierte Antwort
Star Strider
am 21 Apr. 2015
I can’t get legend to work correctly with your plot either. It might be worthwhile to experiment with an annotation object to create something similar. Everything I tried — hold, tweaking the legend properties, tweaking the plots — failed.
I would Contact Support at MathWorks to see if they have a solution. Include the URL to your post here in the message.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Two y-axis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!