TickLabels

class aplpy.TickLabels(parent)[source]

Bases: object

Methods Summary

hide(self)

Hide the x- and y-axis tick labels.

hide_x(self)

Hide the x-axis tick labels.

hide_y(self)

Hide the y-axis tick labels.

set_font(self, **kwargs)

Set the font of the tick labels.

set_style(self, style)

Set the format of the x-axis tick labels.

set_xformat(self, xformat)

Set the format of the x-axis tick labels.

set_xposition(self, position)

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

set_yformat(self, yformat)

Set the format of the y-axis tick labels.

set_yposition(self, position)

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

show(self)

Show the x- and y-axis tick labels.

show_x(self)

Show the x-axis tick labels.

show_y(self)

Show the y-axis tick labels.

Methods Documentation

hide(self)[source]

Hide the x- and y-axis tick labels.

hide_x(self)[source]

Hide the x-axis tick labels.

hide_y(self)[source]

Hide the y-axis tick labels.

set_font(self, **kwargs)[source]

Set the font of the tick 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_style(self, style)[source]

Set the format of the x-axis tick labels.

This can be ‘colons’ or ‘plain’:

  • ‘colons’ uses colons as separators, for example 31:41:59.26 +27:18:28.1

  • ‘plain’ uses letters and symbols as separators, for example 31h41m59.26s +27º18’28.1”

set_xformat(self, xformat)[source]

Set the format of the x-axis tick labels.

If the x-axis type is longitude or latitude, then the options are:

  • d.ddddd - decimal degrees, where the number of decimal places can be varied

  • hh or dd - hours (or degrees)

  • hh:mm or dd:mm - hours and minutes (or degrees and arcminutes)

  • hh:mm:ss or dd:mm:ss - hours, minutes, and seconds (or degrees, arcminutes, and arcseconds)

  • hh:mm:ss.ss or dd:mm:ss.ss - hours, minutes, and seconds (or degrees, arcminutes, and arcseconds), where the number of decimal places can be varied.

If the x-axis type is scalar, then the format should be a valid python string format beginning with a %.

If one of these arguments is not specified, the format for that axis is left unchanged.

set_xposition(self, position)[source]

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

set_yformat(self, yformat)[source]

Set the format of the y-axis tick labels.

If the y-axis type is longitude or latitude, then the options are:

  • d.ddddd - decimal degrees, where the number of decimal places can be varied

  • hh or dd - hours (or degrees)

  • hh:mm or dd:mm - hours and minutes (or degrees and arcminutes)

  • hh:mm:ss or dd:mm:ss - hours, minutes, and seconds (or degrees, arcminutes, and arcseconds)

  • hh:mm:ss.ss or dd:mm:ss.ss - hours, minutes, and seconds (or degrees, arcminutes, and arcseconds), where the number of decimal places can be varied.

If the y-axis type is scalar, then the format should be a valid python string format beginning with a %.

If one of these arguments is not specified, the format for that axis is left unchanged.

set_yposition(self, position)[source]

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

show(self)[source]

Show the x- and y-axis tick labels.

show_x(self)[source]

Show the x-axis tick labels.

show_y(self)[source]

Show the y-axis tick labels.