FancyScaleDraw
- class FancyScaleDraw(format=None, palette=None)[source]
This is a scaleDraw with a tuneable palette and label formats
Import from
taurus.qt.qtgui.extra_guiqwt.scales
as:from taurus.qt.qtgui.extra_guiqwt.scales import FancyScaleDraw
- draw(painter, palette)[source]
Draw the scale
- Parameters:
painter (QPainter) – The painter
palette (QPalette) – Palette, text color is used for the labels, foreground color for ticks and backbone
- getLabelFormat()[source]
pass a format string (e.g. “%g”) or None to use default (it uses the locale)
- label(val)[source]
Convert a value into its representing label
The value is converted to a plain text using QLocale().toString(value). This method is often overloaded by applications to have individual labels.
- Parameters:
value (float) – Value
- Returns:
Label string