TickLabels

class aplpy.TickLabels(parent)[source]

Bases: object

Methods Summary

hide() Hide the x- and y-axis tick labels.
hide_x() Hide the x-axis tick labels.
hide_y() Hide the y-axis tick labels.
set_font(**kwargs) Set the font of the tick labels.
set_style(style) Set the format of the x-axis tick labels.
set_xformat(xformat) Set the format of the x-axis tick labels.
set_xposition(position) Set the position of the x-axis tick labels (‘top’ or ‘bottom’)
set_yformat(yformat) Set the format of the y-axis tick labels.
set_yposition(position) Set the position of the y-axis tick labels (‘left’ or ‘right’)
show() Show the x- and y-axis tick labels.
show_x() Show the x-axis tick labels.
show_y() Show the y-axis tick labels.

Methods Documentation

hide()[source]

Hide the x- and y-axis tick labels.

hide_x()[source]

Hide the x-axis tick labels.

hide_y()[source]

Hide the y-axis tick labels.

set_font(**kwargs)[source]

Set the font of the tick labels.

Parameters:
family : str, 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.

style : str, optional

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

variant : str, optional

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

stretch : str 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’.

weight : str 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’.

size : str 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(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(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(position)[source]

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

set_yformat(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(position)[source]

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

show()[source]

Show the x- and y-axis tick labels.

show_x()[source]

Show the x-axis tick labels.

show_y()[source]

Show the y-axis tick labels.