SetYTitle

SetYTitle — Sets the Y axis title, and optionally its position

Synopsis

$plot->SetYTitle($ytitle, [$ypos])

Description

SetYTitle sets the text to be displayed as the Y axis title. Optionally, it also sets the position of the title and the axis itself: on the left side of the graph (the usual place), on the right side, both, or neither.

Parameters

$ytitle

The text string to use for the Y axis title. The string can contain multiple lines, separated by newlines (in PHP: "\n").

$ypos

Optional position for the Y axis and title. Use one of the following strings for the position:

PositionDescription
plotleftY axis on the left side of the plot
plotrightY axis on the right side of the plot
bothOne Y axis on the left, and one on the right
noneNo Y axis, no Y axis title

The default is 'plotleft'.

Notes

By default, there is no Y axis title. If SetYTitle is called with an empty string as the title, the default behavior is restored. This includes not leaving space on the graph for the title.

SourceForge.net 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.