MATLAB Answers


How can I add a line to an imagec figure?

Asked by Szabó-Takács Beáta on 12 Jun 2019
Latest activity Commented on by Szabó-Takács Beáta on 13 Jun 2019
Accepted Answer by Jan
I use Matlab R2015b. I created an image in the following way:
datetick('x', 'HH:MM');
is datenum. How can I add a vertical line to the figure when x is 17:30 i.e to the t(3952) data? I attached the figure.
Thank you for your help in advance!

  1 Comment

It depends. The "figure" is the complete window. Do you add a line over the complete window? Or do you want to display the line in the axes? In this axes you display the contents of the matrix BS. Do you want to insert the line in this data matrix, or is it enough to draw a line on top of the displayed image?

Sign in to comment.




1 Answer

Answer by Jan
on 12 Jun 2019
 Accepted Answer

Maybe (see my comment above):
line(t([3952, 3952]), altitude([1, end]))

  1 Comment

Sign in to comment.