x axis label in plot

2 次查看(过去 30 天)
Indrani
Indrani 2023-6-28
评论: Indrani 2023-6-29
Hi!
In this graph, I have plotted data for each day from 2015 to 2022. Is there a way to label the x axis with the month and year of plotting?

采纳的回答

Cris LaPierre
Cris LaPierre 2023-6-28
Create a vector of x values that are datetimes. Then plot using plot(x,y) syntax.
  3 个评论
Cris LaPierre
Cris LaPierre 2023-6-29
Share your code and your data. You can save your variables to a mat file and attach it to your post using the paperclip icon.
Indrani
Indrani 2023-6-29
Thanks, but the issue has been solved!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by