AxisLabels

class aplpy.AxisLabels(parent)[source]

Bases: object

Methods Summary

hide()

Hide the x- and y-axis labels.

hide_x()

Hide the x-axis label.

hide_y()

Hide the y-axis label.

set_font(**kwargs)

Set the font of the axis labels.

set_xpad(pad)

Set the x-axis label displacement in terms of the axis label font size.

set_xposition(position)

Set the position of the x-axis label ('top' or 'bottom')

set_xtext(label)

Set the x-axis label text.

set_ypad(pad)

Set the y-axis label displacement in terms of the axis label font size.

set_yposition(position)

Set the position of the y-axis label ('left' or 'right')

set_ytext(label)

Set the y-axis label text.

show()

Show the x- and y-axis labels.

show_x()

Show the x-axis label.

show_y()

Show the y-axis label.

Methods Documentation

hide()[source]

Hide the x- and y-axis labels.

hide_x()[source]

Hide the x-axis label.

hide_y()[source]

Hide the y-axis label.

set_font(**kwargs)[source]

Set the font of the axis labels.

Parameters
familystr, optional

The family of the font to use. This can either be a generic font family name, either ‘serif’, ‘sans-serif’, ‘cursive’, ‘fantasy’, or ‘monospace’, or a list of font names in decreasing order of priority.

stylestr, optional

The font style. This can be ‘normal’, ‘italic’ or ‘oblique’.

variantstr, optional

The font variant. This can be ‘normal’ or ‘small-caps’

stretchstr or int or float, optional

The stretching (spacing between letters) for the font. This can either be a numeric value in the range 0-1000 or one of ‘ultra-condensed’, ‘extra-condensed’, ‘condensed’, ‘semi-condensed’, ‘normal’, ‘semi-expanded’, ‘expanded’, ‘extra-expanded’ or ‘ultra-expanded’.

weightstr or int or float, optional

The weight (or boldness) of the font. This can either be a numeric value in the range 0-1000 or one of ‘ultralight’, ‘light’, ‘normal’, ‘regular’, ‘book’, ‘medium’, ‘roman’, ‘semibold’, ‘demibold’, ‘demi’, ‘bold’, ‘heavy’, ‘extra bold’, ‘black’.

sizestr or int or float, optional

The size of the font. This can either be a numeric value (e.g. 12), giving the size in points, or one of ‘xx-small’, ‘x-small’, ‘small’, ‘medium’, ‘large’, ‘x-large’, or ‘xx-large’.

Notes

Default values are set by matplotlib or previously set values if set_font has already been called. Global default values can be set by editing the matplotlibrc file.

set_xpad(pad)[source]

Set the x-axis label displacement in terms of the axis label font size.

set_xposition(position)[source]

Set the position of the x-axis label (‘top’ or ‘bottom’)

set_xtext(label)[source]

Set the x-axis label text.

set_ypad(pad)[source]

Set the y-axis label displacement in terms of the axis label font size.

set_yposition(position)[source]

Set the position of the y-axis label (‘left’ or ‘right’)

set_ytext(label)[source]

Set the y-axis label text.

show()[source]

Show the x- and y-axis labels.

show_x()[source]

Show the x-axis label.

show_y()[source]

Show the y-axis label.