Remove specific items from legended

6 ビュー (過去 30 日間)
Brian Hoblin
Brian Hoblin 2017 年 1 月 29 日
コメント済み: Brian Hoblin 2017 年 1 月 29 日
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')

採用された回答

Iddo Weiner
Iddo Weiner 2017 年 1 月 29 日
yeah, check this out:
  1 件のコメント
Brian Hoblin
Brian Hoblin 2017 年 1 月 29 日
Thanks

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLegend についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by