GT::Graphics::Axis

An axis can be displayed on a side of a Zone. It's associated to a scale. It precises how much space there's between ticks.

GT::Graphics::Axis->new($scale)

Create a new axis and use the associated scale.

$a->set_{left,right,top,bottom}_side()

Indicate that the axis is on the corresponding side of the graphic.

$a->set_zone($zone)

Indicate the zone attached to the axis.

$a->set_rectangle($x1, $y1, $x2, $y2)

Indicate the rectangle in which the axis should be displayed. The rectangle is defined by the lower left corner (x1,y1) and the upper right corner (x2,y2).

$a->set_space_for(_big)_ticks

Define the space between (big) ticks.

$a->set_grid_level({0|1|2})

Indicate if a grid should be displayed : - 0 => no grid - 1 => grid on big ticks - 2 => grid on all ticks

$a->set_grid_color($color)

Use the indicated color for the grid.

$a->label_display({0|1})

Tell if labels should be displayed or not.

$a->set_custom_ticks([[$x,$label], ...], $below_zone)

Use the given custom ticks. If $below_zone is set to one, the labels will be displayed below the zone starting at the given coordinate, otherwise it will be displayed right below the given coordinate (ie below the tick).

$a->set_custom_big_ticks([[$x,$label], ...], $below_zone)

Use the given custom big ticks. If $below_zone is set to one, the labels will be displayed below the zone starting at the given coordinate, otherwise it will be displayed right below the given coordinate (ie below the tick).

$a->display($driver, $picture)

Display the axis on the picture.