Legend¶
- class understand.Legend¶
Bases:
object
Graph plugin legend object
Optionally provide a legend for your graph. Retrieve the legend from the root
Graph
object withlegend
. In init,define
entries. If you need to update entries later, useset
. Legends are only shown from inside the Understand Gui. Legend visibility is controlled from the graph toolbar.Methods Summary
Define legend entries.
Set legend entry attributes.
Methods Documentation
- define(name, shape, label[, fore[, back[, row, column]]]) None ¶
Define legend entries.
- Parameters:
name (str) – an internal entry name. Use this for the set argument if this entry is updated later.
shape (str) – the shape to draw in the legend. See below for available shapes.
label (str) – the text that will appear in the legend
fore (str or None) – optional, the foreground color
back (str or None) – optional the background color
row (int or None) – optional, the grid row within the legend where this entry should appear.
column (int or None) – optional, the grid column within the legend where this entry should appear.
- Return type:
None
If row and columns are provided, they should be provided for all entries. Available shapes are:
rectangle
roundedrect
ellipse / circle
arrow
dasharrow / dashedarrow
dotarrow / dottedarrow
line
dashline / dashedline
dotline / dottedline
none