![](/profiles/wavemetrics/themes/wavemetrics/logo.png)
Need help plotting a timeseries that only shows the year
![](/sites/default/files/styles/thumbnail/public/default_images/Artboard%201_1.png?itok=jeHOCIXy)
theo.nahemt
Hi,
I am plotting 10 year time series of some chemical components in ambient particulate matter. How do I get the major ticks on the x axis to only show each year? Right now, the major ticks on the x axis show the full date. For example, one of the ticks shows "01 Jan 2012" but I only want it to show "2012". Thanks!
![Current figure](/sites/default/files/styles/content_body/public/2022-08/Layout8.jpg?itok=QbkAkDvK)
Try:
ModifyGraph dateInfo(bottom)={0,0,-1},dateFormat(bottom)={Default,2,1,1,2,"Year",-6}
You can access this via Modify Axis... Ticks and Grids... Date/Time Tick Labels -> Date Format -> Other... Use Custom Format...
Hope this helps.
August 12, 2022 at 05:36 am - Permalink