Editing axis properties
The axis properties allow you to change attributes such as the range on scale axes and the order of categories on a categorical axis.
- Click the Element Properties tab in the side bar of the Chart Builder. (If the side bar is not displayed, click the button in the upper right corner of the Chart Builder to display the side bar.)
- In the Edit Properties Of list, select an axis.
- Modify the axis properties. Details appear below, organized by axis type.
Scale axis properties
Axis Label. Specify text for the axis label. The Chart Builder sets a default that you can override.
If Automatic is selected for the values, the values are automatically set at creation to include all of the data and to create appropriate tick labels (for example, 10 instead of 10.0123). If you don't get exactly what you expect from the range settings, re-create the chart and deselect (clear) Automatic for each setting and enter custom values. Alternatively, you can change the settings in the Chart Editor.
Minimum/Maximum. Change the range for the axis. The minimum and maximum values in the data for the graph are listed so that you can set a range that includes all of the data. Other graph elements (for example, annotations) can be hidden when you change the range. If elements you expect to see aren't displayed, change the range back to automatic. If the scale is transformed, the range values are specified in the same units as the data values.
Major Increment. Specify the size of the increments between major ticks/labels. Beginning with the minimum value, a major tick occurs at every increment specified by this number. In general, a division size that divides evenly into your range works best. For example, if your axis minimum is 0 and the maximum is 400, division sizes of 100, 50, or 25 would work well.
Origin. Specify the origin. The origin has a different effect depending on the graph type.
- For charts with bars and lines, the origin specifies the line from which bars and areas extend. The graphic elements originate at the origin and extend toward their value. For example, if your bar chart includes values of 367 and 48 and the origin is 100, one bar extends up from 100 to 367 (in default coordinates), while the other bar extends down to 48. The specified value for the origin must fall within the minimum and maximum.
- For a scatterplot, specifying an origin is useful only with a transformed axis. The effect of changing the origin is most obvious when the data are far from the origin, because the transformation takes the origin into account. For example, assume that the axis is a log scale. The equation for the transformation is y'=log(y-origin). Therefore, if the data points are 1001, 1002, 1010 and the origin is 0, the transformation will look similar to an untransformed scale. However, if you change the origin to 1000, the transformation will look like a log scale as expected.
Scale Type. There are several options for the scale type. Depending on your data, one may be more appropriate than another.
- Linear. Creates a linear, untransformed scale. This is the default.
- Logarithmic (standard) and Logarithmic (safe). Create a log-transformed scale. Optionally, you can enter a base for the log, which must be greater than 1. The transformation formula used for taking the safe log of an axis value x is not log(x). The formula is modified so that it can handle 0 and negative values. Details about the formula follow.
- Power. Creates an exponent-transformed scale. Optionally, you can enter an exponent. The default is 0.5, which would take the square root of the data.
Formula for Safe Log Transformation
The safe log formula is:
sign(x) * log(1 + abs(x))
So if you assume that the axis value is –99, the result of the transformation is:
sign(-99) * log(1 + abs(-99)) = -1 * log(1 + 99) = -1 * 2 = -2
Categorical axis properties
Axis Label. Specify text for the axis label. The Chart Builder sets a default that you can override.
Sort by and Direction. Select a sorting option for the categories within the variable. Excluding Custom, any of the sorting options can be ascending or descending.
- Custom. Use the order shown in the Order list.
- Label. Use the category labels for sorting the variable's categories. These are the labels that appear in the chart, usually as tick or legend labels.
- Value. Use the value stored in the dataset for sorting the variable's categories. The category's value is what identifies the category in the dataset. It often differs from its label and is not necessarily descriptive. For example, the value might be a number (for example, 1), while the label is a text description of the category (for example, Female).
Order. Manually change the order in which categories appear in the chart. To change the order, select a category name, and then click either the up or the down arrow to the right of the list. The first category in the list is displayed first on the chart. When you manually change the order, the value of Sort By changes to Custom.
Collapse. Collapse the smallest categories into a single Other category. If the check box is selected, the Chart Builder takes the values on the y axis and sums them across all categories. The Chart Builder then collapses any categories with y-axis values that are less than the specified percentage of the total sum. Use this feature to combine categories that are so small that you don't need to display them separately. For example, consider collapsing if you have a pie chart with many categories. This feature is available for only a limited number of statistics: Count, Percentage, Valid N, and Sum. It is unavailable for high-low-close, difference area, and dual axis charts and for any chart specifying error bars.
Angle axis properties (for pie charts)
Angle. Rotate the pie chart slices by entering a clock position at which the first slice starts. You can also change whether the category order goes in a clockwise or counterclockwise direction.
Display axis. Show or hide the axis around the perimeter of the pie chart. The axis is not typically displayed for a pie chart, but you may want to show it in some cases. For example, when the pie chart slices represent the sum of a variable, you can show the axis to determine the total of two or more slices.