##
6.2 Axes

Module `axis` defines the look of an axis as well as grid lines. Two classes, `axis.X` and `axis.Y`, are provided by this module.

class `axis.X`
  This class is draws an X (horizontal) axis.

  `draw_tics_above`
    Type: int Default: 0.

    If true, tick lines and labels are drawn above the axis line.

  `format`
    Type: printf format string Default: "%s".

    The format string for tick labels. It can be a `printf' style format string, or a single-parameter function that takes an X (or Y) value and returns a string. The appearance of the string produced here can be controlled using escape sequences. See Section 17

  `label`
    Type: str Default: "axis label".

    The descriptive string displayed below (or to the left of) the axis. See Section 17.

  `label_offset`
    Type: (x,y) or None Default: (None, None).

    The location for drawing the axis label, relative to the middle point of the axis. If the value is None, the label is displayed below (or to the left of) of axis at the middle.

  `line_style`
    Type: line_style.T ( see Section 14) Default: line_style.black.

    Specifies the style of axis and tick lines.

  `minor_tic_interval`
    Type: number or function Default: None.

    When the value is a number, it specifies the interval at which minor tick marks are drawn. Otherwise, the value must be a function that takes two arguments, min and max X (or Y) values. It must return a list of numbers that specify the X or Y points at which minor tick marks are drawn.

  `minor_tic_len`
    Type: length in points ( See Section 4) Default: 3.

    The length of minor tick marks. The value can be negative, in which case the tick lines are drawn right of (or above) the axis.

  `offset`
    Type: length in points ( See Section 4) Default: 0.

    The location of the axis. The value of 0 draws the axis at the left (for the Y axis) or bottom (for the X axis) edge of the drawing area.

  `tic_interval`
    Type: number or function Default: None.

    When the value is a number, it specifies the interval at which tick marks are drawn. Otherwise, the value must be a function that takes two arguments, min and max X (or Y) values. It must return a list of numbers that specify the X or Y points at which tick marks are drawn.

  `tic_label_offset`
    Type: (x,y) or None Default: (0, 0).

    The location for drawing tick labels, relative to the tip of the tick line.

  `tic_len`
    Type: length in points ( See Section 4) Default: 6.

    The length of tick lines. The value can be negative, in which case the tick lines are drawn right of (or above) the axis.

class `axis.Y`
  This class is draws a Y (vertical) axis.

  `draw_tics_right`
    Type: int Default: 0.

    If true, tick lines and labels are drawn right of the axis line.

  `format`
    Type: printf format string Default: "%s".

    The format string for tick labels. It can be a `printf' style format string, or a single-parameter function that takes an X (or Y) value and returns a string. The appearance of the string produced here can be controlled using escape sequences. See Section 17

  `label`
    Type: str Default: "axis label".

    The descriptive string displayed below (or to the left of) the axis. See Section 17.

  `label_offset`
    Type: (x,y) or None Default: (None, None).

    The location for drawing the axis label, relative to the middle point of the axis. If the value is None, the label is displayed below (or to the left of) of axis at the middle.

  `line_style`
    Type: line_style.T ( see Section 14) Default: line_style.black.

    Specifies the style of axis and tick lines.

  `minor_tic_interval`
    Type: number or function Default: None.

    When the value is a number, it specifies the interval at which minor tick marks are drawn. Otherwise, the value must be a function that takes two arguments, min and max X (or Y) values. It must return a list of numbers that specify the X or Y points at which minor tick marks are drawn.

  `minor_tic_len`
    Type: length in points ( See Section 4) Default: 3.

    The length of minor tick marks. The value can be negative, in which case the tick lines are drawn right of (or above) the axis.

  `offset`
    Type: length in points ( See Section 4) Default: 0.

    The location of the axis. The value of 0 draws the axis at the left (for the Y axis) or bottom (for the X axis) edge of the drawing area.

  `tic_interval`
    Type: number or function Default: None.

    When the value is a number, it specifies the interval at which tick marks are drawn. Otherwise, the value must be a function that takes two arguments, min and max X (or Y) values. It must return a list of numbers that specify the X or Y points at which tick marks are drawn.

  `tic_label_offset`
    Type: (x,y) or None Default: (0, 0).

    The location for drawing tick labels, relative to the tip of the tick line.

  `tic_len`
    Type: length in points ( See Section 4) Default: 6.

    The length of tick lines. The value can be negative, in which case the tick lines are drawn right of (or above) the axis.