Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

How can i specify an xticklabel as a range so for the first 12 data points it shows 2008 across it and for the next 12 it shows 2009 and so on?

1 Ansicht (letzte 30 Tage)
im plotting a 132x1 vector and would like the x axis to show a year for every 12 data points and wouod like it to so as a range so the label would indicate that points 1-12 are 2008,13-24 are 2009 and so on

Antworten (2)

madhan ravi
madhan ravi am 29 Nov. 2018

Luna
Luna am 29 Nov. 2018
Hi Ben,
Maybe this could help?
yearDef = cell(24,1)
yearDef(1:12,1) = {'2008'}
yearDef(13:end,1) = {'2009'};
xticklabels(yearDef)

Diese Frage ist geschlossen.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by