AxisLabels

class aplpy.AxisLabels(parent)[source]

Bases: object

Methods Summary

hide(self)

Hide the x- and y-axis labels.

hide_x(self)

Hide the x-axis label.

hide_y(self)

Hide the y-axis label.

set_font(self, **kwargs)

Set the font of the axis labels.

set_xpad(self, pad)

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

set_xposition(self, position)

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

set_xtext(self, label)

Set the x-axis label text.

set_ypad(self, pad)

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

set_yposition(self, position)

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

set_ytext(self, label)

Set the y-axis label text.

show(self)

Show the x- and y-axis labels.

show_x(self)

Show the x-axis label.

show_y(self)

Show the y-axis label.

Methods Documentation

hide(self)[source]

Hide the x- and y-axis labels.

hide_x(self)[source]

Hide the x-axis label.

hide_y(self)[source]

Hide the y-axis label.

set_font(self, **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(self, pad)[source]

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

set_xposition(self, position)[source]

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

set_xtext(self, label)[source]

Set the x-axis label text.

set_ypad(self, pad)[source]

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

set_yposition(self, position)[source]

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

set_ytext(self, label)[source]

Set the y-axis label text.

show(self)[source]

Show the x- and y-axis labels.

show_x(self)[source]

Show the x-axis label.

show_y(self)[source]

Show the y-axis label.