SetYTickPos

SetYTickPos — Position the Y axis tick marks

Synopsis

$plot->SetYTickPos($tp)
    

Description

SetYTickPos determines where (and if) the Y tick marks are drawn. The tick marks can be drawn on the left side of the plot, on the right side the plot, in both positions, at the Y axis (even if it is in the middle of the plot), or not drawn at all.

Parameters

$tp

A string indicating the desired position for the Y tick marks:

PositionDescription
plotleftTick marks on the left side of the plot
plotrightTick marks on the right side of the plot
bothTick marks on both left and right sides of the plot
yaxisTick marks at Y axis (even if the axis is in the middle of the plot)
noneNo tick marks

Notes

The default position for the Y tick marks is on the left side of the plot.

This applies only to tick marks. You may want the tick labels to be in the same positions as the tick marks. To position the tick labels, see SetYTickLabelPos.

Unlike the X axis, which is by default drawn at Y=0, the Y axis is by default drawn at the left side of the plot, not at X=0. It can be moved to a different position with SetYAxisPosition. If it isn't moved, 'yaxis' and 'plotleft' positions are the same.