to highlight median value on the plot.

6 Ansichten (letzte 30 Tage)
Sajid Afaque
Sajid Afaque am 11 Jun. 2020
Kommentiert: Sajid Afaque am 11 Jun. 2020
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

Antworten (1)

KSSV
KSSV am 11 Jun. 2020
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 Kommentare
KSSV
KSSV am 11 Jun. 2020
h = cdfplot(z);
h should have data points.
Sajid Afaque
Sajid Afaque am 11 Jun. 2020
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

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by