How to link two given points and add isolines to a plot?

조회 수: 2 (최근 30일)
Genhou SUN
Genhou SUN 2019년 7월 10일
댓글: Genhou SUN 2019년 7월 10일
Hi, everyone. I need some help to draw a plot with differnt kinds of lines. A case of the plot can be seen in the figure. It is very easy to draw the red, blue and green soild lines. However , I do not know how to draw the red, blue and green dash lines when I already know the starting and ending coordinations of these dash lines? If possible, Could anyone tell me how to draw the other two black dash lines. The two black dash lines are isolines and their values can be given freely.
plot with different lines.png

채택된 답변

KSSV
KSSV 2019년 7월 10일
It looks like you have three curves i.e three different set of (x,y) arrays corresponding to Red, Blue and Green. Also you three points (xx,yy) corresponding to R, B and G.
hold on
plot([xx x(1)],[yy y(1)],'--k')
plot([xx x(end)],[yy y(end)],'--k')
  댓글 수: 1
Genhou SUN
Genhou SUN 2019년 7월 10일
Thanks a lot. It works.
I wonder could you help me with how to add the isolines to this plot. One isoline increases from 0.005 to 0.04 from right to the left and the other isoline decreases from 935mba to 535mba from left to right.
The two isolines seem to be contour lines, but I fail to figure out how to add the two isolines to this plot. Thanks a lot in advance.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by