Remove specific items from legended
10 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Brian Hoblin
il 29 Gen 2017
Commentato: Brian Hoblin
il 29 Gen 2017
I used the drawArrow function to mark the x and y axis on my plot but I don't want them in the legend. Could someone please tell me how/if it is possible to only have specific items show up in the legend? They show up without any text in the legend but I would prefer that they just don't appear at all in the legend. Thanks.
x1=[0 0.29478297];
x2=[0 9.705216919];
x3=[-3 10];
y3=[1 -10];
m1=1.398248942;
m2=-0.172547385;
y1=m1*x1;
y2=m2*x2;
drawArrow = @(x,y) quiver( x(1),y(1),x(2)-x(1),y(2)-y(1),0,'k' )
x3 = [0 0];
y3 = [-2 1];
drawArrow(x3,y3);
hold on
x4 = [-0.5 10];
y4 = [0 0];
drawArrow(x4,y4)
hold on
plot(x1,y1,x2,y2)
hold on
%grid on
title('Phasor Diagram of Section B Circuit')
legend('','','Capacitor Voltage','Resistor Voltage')
xlabel('Real')
ylabel('Imaginary')
0 Commenti
Risposta accettata
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Legend in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!