SetYAxisPosition — Move the Y axis




SetYAxisPosition sets the position of the Y axis.



The X position in world coordinates for the Y 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 Y axis position defaults to the left side of the plot. For horizontal plots, the Y axis position defaults to X=0, provided X=0 is within the range of the graph. If X=0 is not within the range of the graph, the Y axis position will default to the edge with the smallest absolute X value. This means the Y axis will be on the left side of the graph if all values of X are greater than zero, and on the right side of the graph if all values of X are less than zero. (For log scale plots, however, the default Y axis position is X=1.)


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 Y axis always defaulted to the left side of the plot. When plotting negative data with horizontal plots, it was usually necessary to use SetYAxisPosition(0) to force the bars to start from X=0. Logo

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.