mpl_toolkits.axisartist.axislines.AxisArtistHelper

class mpl_toolkits.axisartist.axislines.AxisArtistHelper [source]

Bases: object

AxisArtistHelper should define following method with given APIs. Note that the first axes argument will be axes attribute of the caller artist.:

# LINE (spinal line?)

def get_line(self, axes):
    # path : Path
    return path

def get_line_transform(self, axes):
    # ...
    # trans : transform
    return trans

# LABEL

def get_label_pos(self, axes):
    # x, y : position
    return (x, y), trans

def get_label_offset_transform(self,                 axes,
        pad_points, fontprops, renderer,
        bboxes,
        ):
    # va : vertical alignment
    # ha : horizontal alignment
    # a : angle
    return trans, va, ha, a

# TICK

def get_tick_transform(self, axes):
    return trans

def get_tick_iterators(self, axes):
    # iter : iterable object that yields (c, angle, l) where
    # c, angle, l is position, tick angle, and label

    return iter_major, iter_minor
class Fixed(loc, nth_coord=None) [source]

Bases: mpl_toolkits.axisartist.axislines._Base

Helper class for a fixed (in the axes coordinate) axis.

nth_coord = along which coordinate value varies in 2d, nth_coord = 0 -> x axis, nth_coord = 1 -> y axis

get_axislabel_pos_angle(axes) [source]

label reference position in transAxes.

get_label_transform() returns a transform of (transAxes+offset)

get_axislabel_transform(axes) [source]
get_line(axes) [source]
get_line_transform(axes) [source]
get_nth_coord() [source]
get_tick_transform(axes) [source]
class Floating(nth_coord, value) [source]

Bases: mpl_toolkits.axisartist.axislines._Base

get_line(axes) [source]
get_nth_coord() [source]

© 2012–2018 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.0.0/api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelper.html