Grapher can create a graph with data based on dates, times, or dates and times. When data are stored in the worksheet in date/time format, Grapher will automatically recognize the format and create the axis displaying the dates in most cases. By default, Grapher will use your Windows locale setting, but, different date/time formats can be used.
To create a graph from date/time data, click the Graphs | Create | <graph category> | <plot type> command. Select the data file and click Open. The appropriate axis will automatically be in date/time format.
The X axis is automatically displayed in date/time format.
If the date/time values are formatted with a custom date/time format that is not recognized by Grapher, or, you'd like to change the date/time formatting or interval, use these steps:
- Select the axis.
- Click on the Labels tab in the Property Manager.
- Check the box in the General section next to Use date/time format.
- To format the date/time labels:
- Click the Select button next to Major label date/time format.
- Select the appropriate language in the Language (Country) list and click the Insert button. For instance, you might select German (Germany) - [$407].
- Select the appropriate Predefined date/time formats option and click Insert. For instance, you might select dd.MMM.yyyy.
- Click OK and the date/time format is displayed on the axis in the set format.
- To set the interval:
- Click on the Ticks tab.
- In the Major Ticks section, check the box next to the Use date/time spacing option.
- Click the Every Year button next to Date/time spacing.
- Set the interval and units for the major tick marks. If you want a quarterly tick mark, you would increase the number in the Every box to 3 and select Month from the dropdown list.
- Click OK and the major tick marks are now showing the desired number of labels.
Where column A contains the date and column B contains the time. After adding the columns together, format the new column as a recognized date/time format. This new column can now be used to create a plot.
Updated July 26, 2019