필터 지우기
필터 지우기

adding a undepending line to legend of plot

조회 수: 3 (최근 30일)
Miky
Miky 2019년 5월 10일
답변: Miky 2019년 5월 10일
Hello,
I want to plot a graphic to compare Measurments and Simulations
therefore I want to display a black line which is point out wich of the data is measurment and which is simulation
I added an example of my plot without the described lines
  댓글 수: 2
dpb
dpb 2019년 5월 10일
Start with
doc annotation
There are examples of just such there...
Miky
Miky 2019년 5월 10일
Thanks for the answer, it helped me to find the right solution.

댓글을 달려면 로그인하십시오.

채택된 답변

Miky
Miky 2019년 5월 10일
Hey,
the solution I found now is very simple and not so nice but it works for me.
plot(x1,y1,'LineWidth',1.5,'Color','b')
plot(x2,y2,'LineWidth',1.5,'Color','r')
plot(0,0,'-','Color','k')
plot(0,0,'--','Color','k')
plot(x3,y3,'--','LineWidth',2,'Color','b');
plot(x4,y4,'--','LineWidth',2,'Color','r');
hl=legend(name_a,name_b,'Simulation','Measurement','Location','southeast')

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Legend에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by