SetXTitle

SetXTitle — Sets the X axis title, and optionally its position

Synopsis

$plot->SetXTitle($xtitle, [$xpos])

Description

SetXTitle sets the text to be displayed as the X axis title. Optionally, it also sets the position of the title and the axis itself: below the graph (the usual place), above the graph, both, or neither.

Parameters

$xtitle

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

$xpos

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

PositionDescription
plotdownX axis below the plot
plotupX axis above the plot
bothOne X axis above, and one below
noneNo X axis, no X axis title

The default is 'plotdown'.

Notes

By default, there is no X axis title. If SetXTitle 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.