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
- set_font(**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(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
orlatitude
, then the options are:d.ddddd
- decimal degrees, where the number of decimal places can be variedhh
ordd
- hours (or degrees)hh:mm
ordd:mm
- hours and minutes (or degrees and arcminutes)hh:mm:ss
ordd:mm:ss
- hours, minutes, and seconds (or degrees, arcminutes, and arcseconds)hh:mm:ss.ss
ordd: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_yformat(yformat)[source]¶
Set the format of the y-axis tick labels.
If the y-axis type is
longitude
orlatitude
, then the options are:d.ddddd
- decimal degrees, where the number of decimal places can be variedhh
ordd
- hours (or degrees)hh:mm
ordd:mm
- hours and minutes (or degrees and arcminutes)hh:mm:ss
ordd:mm:ss
- hours, minutes, and seconds (or degrees, arcminutes, and arcseconds)hh:mm:ss.ss
ordd: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.