Legend module
- class lys.widgets.canvas.interface.Legend.CanvasLegend(canvas)[source]
Bases:
CanvasPartAbstract base class for Legend. All methods in this interface can be accessed from
CanvasBaseinstance.- getLegendFont()[source]
Get the font of the legend.
- Returns:
The information of font. See
setLegendFont()- Return type:
dict
- getLegendFrameVisible()[source]
Get the visibility of the frame
- Returns:
The visibility of the frame.
- Return type:
bool
- getLegendPosition()[source]
Get the font of the legend.
- Returns:
The position of the legend.
- Return type:
tuple
- legendPositionChanged
Emitted when the position of the legend is changed.
- setLegendFont(fname, size=10, color='black')[source]
Set the font of the legend.
- Parameters:
fname (str) – The name of the font.
size (int) – The size of the font.
color (str) – The color of the font such as #111111.