![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175462/image.jpeg)
how to draw a horizontal line at 63% of process curve, and vertical line to intersection of process curve, on a plot?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
please guide to draw a horizontal line at 63% of process curve (first order model of level) which is now in this case (63% of 25 is 15.75), and vertical line to intersection of process curve, on a plot as shown in image attached.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/145191/image.png)
i am using readings for process curve as follows. L=0:25; T=[0 0.25 0.48 1.15 1.35 2.07 2.36 3.09 3.45 4.20 4.56 5.38 6.25 7.10 8.04 8.58 10.30 11.45 13.06 14.58 17.00 20.00 23.15 29.15 37.0 58.0]; plot(T,L); grid; Please suggest code Regards mms79
0 commentaires
Réponse acceptée
Ben11
le 25 Août 2014
Modifié(e) : Ben11
le 25 Août 2014
Add these lines after your call to plot:
line([0 10],[15.75 15.75],'Color','k','LineWidth',2) % Horizontal line
line([10 10],[0 15.75],'Color','k','LineWidth',2) % vertical line
I used x = 10 by visual inspection though, but you get the idea for drawing lines :)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175462/image.jpeg)
Plus de réponses (1)
Image Analyst
le 25 Août 2014
Try this
yl = ylim();
xl = xlim();
% Draw vertical line.
line([10,10], [yl(1), 15.75], 'Color', [0,0,0], 'LineWidth', 2);
% Draw horizontal line.
line([xl(1),10], [15.75, 15.75], 'Color', [0,0,0], 'LineWidth', 2);
Voir également
Catégories
En savoir plus sur Annotations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!