Azzera filtri
Azzera filtri

x axis label in plot

2 visualizzazioni (ultimi 30 giorni)
Indrani
Indrani il 28 Giu 2023
Commentato: Indrani il 29 Giu 2023
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?

Risposta accettata

Cris LaPierre
Cris LaPierre il 28 Giu 2023
Create a vector of x values that are datetimes. Then plot using plot(x,y) syntax.
  3 Commenti
Cris LaPierre
Cris LaPierre il 29 Giu 2023
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 il 29 Giu 2023
Thanks, but the issue has been solved!

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Line Plots in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by