SetYTitle
Prev | PHPlot Function Reference | Next

## 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:

  Position | Description
  --- | ---
  plotleft | Y axis on the left side of the plot
  plotright | Y axis on the right side of the plot
  both | One Y axis on the left, and one on the right
  none | No 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.

Prev | Up | Next
SetYTimeFormat | Home | SetYTitleColor