Info

This question is closed. Reopen it to edit or answer.

Given a datetime plot, how to i insert a text in the plot?

1 view (last 30 days)
Hi I have a datetime plot. I want to insert a text in a specific part of the plot. Since my xaxis is no longer an integer, I am getting error while using "text".
How can i solve it?
x_p=time_select_20000(out_select(i,2):out_select(i,3));% datetime array
y_p=Alt_select_20000(out_select(i,2):out_select(i,3));%integer
plot(x_p,y_p)
i=1;
a=time_select_20000(out_select(i,2));%datetime point
b=Alt_select_20000(out_select(i,2));%integer point
n=10
str1 = sprintf('Flight level : %d',n)
text(a,b,str1)
I am getting this error
Error using text
First two or three arguments must be numeric doubles.
How do i change the datetime to satisfy this?

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!