AxisLabel module
- class lys.widgets.canvas.interface.AxisLabel.CanvasAxisLabel(canvas)[source]
Bases:
CanvasPart
Interface to access axis label of canvas. All methods in this interface can be accessed from
CanvasBase
instance.- getAxisLabel(axis)[source]
Get the label of axis
- Parameters
axis ('Left' or 'Right' or 'Top' or 'Bottom') – The axis.
- Returns
The text of the label.
- Return type
str
- getAxisLabelCoords(axis)[source]
Get the position of the label.
- Parameters
axis ('Left' or 'Right' or 'Top' or 'Bottom') – The axis.
- Returns
The position of the label. Usually negative around -0.2.
- Return type
float
- getAxisLabelFont(axis)[source]
Get the font of the label.
- Parameters
axis ('Left' or 'Right' or 'Top' or 'Bottom') – The axis.
- Returns
The information of font. See
setAxisLabelFont()
- Return type
dict
- getAxisLabelVisible(axis)[source]
Get the visibility of the label.
- Parameters
axis ('Left' or 'Right' or 'Top' or 'Bottom') – The axis.
- Returns
True if the label is shown.
- Return type
bool
- setAxisLabel(axis, text)[source]
Set the label of axis.
- Parameters
axis ('Left' or 'Right' or 'Top' or 'Bottom') – The axis.
text (str) – Label to be set.
- setAxisLabelCoords(axis, pos)[source]
Set the position of the label.
- Parameters
axis ('Left' or 'Right' or 'Top' or 'Bottom') – The axis.
pos (float) – The position of the label. Usually negative around -0.2.
- class lys.widgets.canvas.interface.AxisLabel.CanvasTickLabel(canvas)[source]
Bases:
CanvasPart
Interface to access tick label of canvas. All methods in this interface can be accessed from
CanvasBase
instance.- getTickLabelFont(axis)[source]
Get the font of the label.
- Parameters
axis ('Left' or 'Right' or 'Top' or 'Bottom') – The axis.
- Returns
The information of font. See
setTickLabelFont()
- Return type
dict
- getTickLabelVisible(axis, mirror=False)[source]
Get the visibility of the tick label.
- Parameters
axis ('Left' or 'Right' or 'Top' or 'Bottom') – The axis.
mirror (bool) – return the visibility of mirror label when it is True.
- Returns
visibility of the tick label.
- Return type
bool