How to Customize Axis Labels to Show Logical Date Intervals

Visualizing data by date is a great way to explore trend. However, because time intervals are not fixed (e.g., a month can be from 28 to 31 days), a fixed axis scaling may not give the most logical axis representation of dates.
Suppose you have data that is collected daily but you want to label the axis in weekly, monthly, quarterly, or yearly intervals. With a new feature in STATISTICA 12, you can easily control the label of the axes in a way that is relevant and makes sense for time.
The data set, Retail.sta, is one of the example data sets included with STATISTICA. To open the data set, select the File tab. In the left pane, select Open Examples. In the Open a STATISTICA Data File dialog box, double-click on the Datasets folder, select the Retail.sta file, and click the Open button.
Opening the Retail.sta dataset
Select the Graphs tab. In the Common group, click Scatterplot to display the 2D Scatterplots Startup Panel. Click the Variables button to display the Select Variables for Scatterplot dialog box, and select Date as X and Sales as Y.
Dialog box for selecting Scatterplot variables
Click the OK button.
In the 2D Scatterplots Startup Panel, click OK. The resulting graph will be a scatterplot with default date intervals on the x-axis.
Graph with default data intervals on x-axis
The x-axis labels are every 500 units (days in this example) by default. The default units would be appropriate in many situations, but with respect to time, months or years would be more logical.
Now, to customize the date interval on the x-axis, double-click in the graph background to display the Graph Options dialog box.
Under the Axis heading, select Major Units. On the Mode drop-down list, select Manual. Then, select the Date/time step check box to generate a date/time step in the plot. Finally, on the Unit drop-down list, select Year. Note that the Date/time step option is available only when the Mode is set to Manual. Also, note that the step Size is 1 by default and can be adjusted as desired, and Unit can be set to Year, Month, Week, Day, Hour, or Second.
Customizing with Graph Options dialog box
Click OK to apply the changes to the graph that show the x-axis in yearly intervals as shown below.
Graph with forced yearly data intervals on x-axis
While this graph shows the same information, the x-axis labeling is clearly better for showing yearly trend.
You can also change the labeling on the x-axis, that is, you can start labeling from January (or any other month) instead of December. To change the labeling on the x-axis, double-click in the graph background to display the Graph Options dialog box.
Under the Axis heading, select Scaling. Change the Mode to Manual, and select January-1952 for the Minimum and January-1966 for the Maximum.
More customizing with Graph Options dialog
Now, select the Major Units tab, and on the Step Count drop-down list select From Minimum.
Customizing Step Count with Graph Options dialog box
Click OK to assign these changes to the graph. The x-axis is labeled from January as shown below.
Graph with forced January-Year intervals on x-axis
This graph shows the same information, but the x-axis has been modified to adjust for the first month of the year.
Thus, with the Date/Time step option, you can easily customize the axis labels to show appropriate dates.

About statsoftsa

StatSoft, Inc. was founded in 1984 and is now one of the largest global providers of analytic software worldwide. StatSoft is also the largest manufacturer of enterprise-wide quality control and improvement software systems in the world, and the only company capable of supporting its QC products worldwide, with wholly owned subsidiaries in all major markets (StatSoft has 23 full-service offices, on all continents), and its software is available in more than 10 languages.

Posted on October 14, 2013, in Uncategorized. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: