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


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


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.



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


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

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'.


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