SetXAxisPosition — Move the X axis
$plot->SetXAxisPosition([$pos
])
$pos
The Y position in world coordinates for the X axis. (World coordinates are the coordinate space of your data points.) If the value is omitted or an empty string, the default behavior is restored.
The given position is truncated (towards 0) to an integer value.
The default axis position differs for vertical and horizontal plots. For vertical plots, the X axis position defaults to Y=0, provided Y=0 is within the range of the graph. If Y=0 is not within the range of the graph, the X axis position will default to the edge with the smallest absolute Y value. This means the X axis will be at the bottom of the graph if all values of Y are greater than zero, and at the top of the graph if all values of Y are less than zero. (For log scale plots, however, the default X axis position is Y=1.) For horizontal plots, the X axis position defaults to the bottom of the plot.
Through PHPlot-5.3.0, the argument was required, and there was no way to restore the default behavior (because the argument value was always converted to an integer). Starting with PHPlot-5.3.1, the argument may be given as an empty string, or omitted, to restore the default behavior.
Through PHPlot-5.1.3, there was no special handling for horizontal plots. The X axis always defaulted to Y=0 or the Y with the smallest absolute value.
Through PHPlot-5.1.0, the default position for the X axis was the bottom of the graph whenever Y=0 was not within the range the graph, regardless of whether the data was all positive or all negative.
This version of the manual was produced for the
PHPlot Sourceforge project web service site, which requires the logo on each
page.
To download a logo-free copy of the manual, see the
PHPlot project downloads
area.