Graph IDE ► Graphs ► Auto Scaler

The Auto Scaler changes the graph's limits, tick locations and some other attributes based on the values of the data on the graph. There are a few reasons to use the autoscaler:

- When you paste data into a data graphic, for example point data in a Function graphic inspector editor, then the data may be out of the current bounds of the graph. In order to correct this you can apply the autoscaler in the graph's inspector editor.
- If you program graphs using Vvidget Code or Vvidget Server then the graph autoscale parameters can be set in the template file.
- Animated graphs can produce data that goes out of bounds and the autoscaler can be used to automatically reset the graph limits to encompass the data during the animation.
- Multiple coordinate graphs can have many coordinate limits and using the Set Using Auto Scaler button on the main inspector editor will reset all limits at once to limits that are likely desired.

Inspector Editor

The Inspector Editor for the autoscaler is shown below. This inspector editor is for linear axes.

Update Graph : Selecting this button autoscales the graph according to the following settings. If there is no data on the graph then the update button is disabled.

Type

Autoscale Type : Keep at None or Decimal. None disables the autoscaler while Decimal will autoscale the axis according to decimal intervals. In many cases, it make sense to set the autoscaler type to None in one dimension and to a value other than None in the other dimension.

Sign Type : One of Natural, Positive Only, Negative Only, Symmetric. Natural is the usual value and will autoscale to include all data, Positive Only will set the axis limits only to positive values, Negative Only will set the axis limits only to negative values, Symmetric will set the axis limits to the same absolute value but with opposite signs and will autoscale to include all data.

Limits (both Minimum and Maximum)

Data : When the data limits row is checked then the actual data limits are used for autoscaler computation. There is a separate setting for minimum and maximum limits.

Fixed : When the fixed limits row is checked then value entered is used for autoscaler computation. There is a separate setting for minimum and maximum limits. Choosing the fixed limits deselects the data limits and visa versa.

Gap : The gap is an integer that corresponds to the number of tick intervals that are padded in the autoscaler computation. The gap is usually zero, but sometimes is one or more.

Align : Align is one of None, Tick, Subtick, Data. None is a technicality, Tick means align the axis limit to whole tick values, Subtick means align the axis limit to whole subtick values and Data means align the axis limits to data values.

Components To Update

The autoscaler will update all graph and axis components to make those components consistent, unless those updates are turned off. Those components are Ticks, Subticks, Grid and Label Format.

Note: The following discussion is based upon heuristics as desired results are dependent upon user preferences. As such, they may not be exactly what you are looking for and they also might not reflect the actual performance.

Ticks : Update the ticks. The autoscaler updates the graph limits and the ticks can float away from those limits. By letting the autoscaler update the ticks the limits and ticks will be coincidental, which is probably the way you are use to seeing them.

Subticks : The autoscaler can make the tick increment very different from its previous value. The subtick count typically is dependent upon the tick increment. For example: If the increment is every five units then the subtick count would most likely need to be 0, 1 or 4. Hence, in some cases the subtick count needs to be a function of the tick count.

Grid : With almost all cases, the grid discretization should follow the tick discretization so that the grid update should be left checked (on).

Label Format : Sometimes the autoscaler will remap the coordinate system to disparate ranges and in this case the Label Format may need to change, say from decimal notation to scientific notation. Leaving this selection checked (on) permits the autoscaler to account for that variation.