Axis Label Positioning

The labels subelement of the horizontalaxis and verticalaxis elements allows you to control how Multigraph places tic marks and labels along the axis. The location of the label for each tic mark is determined by the position, anchor, and angle attributes of the labels tag. In terms of the discussion in the section called “Positioning”, the "small" rectangle that is being positioned is an imaginary rectangle surrounding the text label, and the "base" point for each label is the location of the corresponding tic mark on the axis (the labels tag does not take a base attribute).

Through various combinations of the anchor, position, and angle attributes it is possible to position, orient, and justify text in a graph very precisely. Figure 6, “Axis Label Placement Examples” shows several examples. Note that the rectangles drawn around the text in the figure are shown just for clarity; in a real graph, Multigraph does not draw these rectangles.

Figure 6. Axis Label Placement Examples

Axis Label Placement Examples

Note: this web site is for the old, Flash-based, version of Multigraph. Starting in December 2012, there is a new JavaScript/HTML5 version of Multigraph, which is distributed from the site multigraph.github.io. Future projects should use the new JavaScript/HTML5 version of Multigraph rather than the Flash version described here.