Display correct time on x-axis
Show older comments
Hello! I am trying to plot time on the x-axis and I am having some difficulty. The times I have are in a text file and look like this:
9:36:36 PM
9:38:10 PM
9:39:44 PM
9:41:18 PM
9:42:54 PM
...
1:35:22 AM
1:36:56 AM
1:38:32 AM
1:40:06 AM
1:41:42 AM
1:43:16 AM
I have tried importing the text file as a column vector using the datetime format. When I do so, I see all the correct times. However, when I go to plot them on the x-axis the displayed times do not correspond to my times, and I also get the date at the end which I do not want. I've included an image to show what I mean.
I should add that I'm fairly new to matlab, so I'm still learning the ropes!
Thank you very much!
Accepted Answer
More Answers (0)
Categories
Find more on Printing and Saving in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!