to highlight median value on the plot.

hello ,
i have plotted a graph using
cdfplot(z)
now i need to indicate median as a line on graph as shown below
here i need the red lines shown above.
one i need at y-axis = 0.5 and one at Y-axis = 0.9.
i also want to display the corresponsing x value their.
thank you in advance

답변 (1개)

KSSV
KSSV 2020년 6월 11일

0 개 추천

You can get the corresponding points and use plot to draw a line.
To show up the text, you can use the function text.

댓글 수: 5

Sajid Afaque
Sajid Afaque 2020년 6월 11일
hello ,
but i only know the y values.
i need to draw a line to it and find x value
KSSV
KSSV 2020년 6월 11일
Use the inequality and get the index of y to find x.
but since i am using directly
cdfplot(z) ;
to plot the graph i do not get values of y or the index.
please elaborate and explain if i am wrong
h = cdfplot(z);
h should have data points.
Sajid Afaque
Sajid Afaque 2020년 6월 11일
i have plotted the lines.
Now i need to indicate the corresponding values of x at position 1 and 2.
since the xvalue at position 1 and 2 changes each time , if i use text i cannot have the textbox fixed at particular location.
so how can i dynamically introduce something that correctly represents x values at corresponding places

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

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

질문:

2020년 6월 11일

댓글:

2020년 6월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by