DateTimeScaleEngine
- class DateTimeScaleEngine(scaleDraw=None)[source]
Import from
taurus.qt.qtgui.extra_guiqwt.scales
as:from taurus.qt.qtgui.extra_guiqwt.scales import DateTimeScaleEngine
- static disableInAxis(plot, axis, scaleDraw=None, scaleEngine=None)[source]
convenience method that will disable this engine in the given axis. Note that it changes the ScaleDraw as well.
- Parameters:
plot (qwt.QwtPlot) – the plot to change
axis (qwt.QwtPlot.Axis) – the id of the axis
scaleDraw (qwt.QwtScaleDraw) – Scale draw to use. If None given, a
FancyScaleDraw
will be setscaleEngine (qwt.QwtScaleEngine) – Scale draw to use. If None given, a
qwt.QwtLinearScaleEngine
will be set
- divideScale(x1, x2, maxMajSteps, maxMinSteps, stepSize)[source]
Reimplements qwt.QwtLinearScaleEngine.divideScale
Important: The stepSize parameter is ignored.
- Returns:
a scale division whose ticks are aligned with the natural time units
- Return type:
qwt.QwtScaleDiv
- static enableInAxis(plot, axis, scaleDraw=None, rotation=None)[source]
convenience method that will enable this engine in the given axis. Note that it changes the ScaleDraw as well.
- Parameters:
plot (qwt.QwtPlot) – the plot to change
axis (qwt.QwtPlot.Axis) – the id of the axis
scaleDraw (qwt.QwtScaleDraw) – Scale draw to use. If None given, the current ScaleDraw for the plot will be used if possible, and a
TaurusTimeScaleDraw
will be set if notrotation (float or None) – The rotation of the labels (in degrees, clockwise- positive)
- static getDefaultAxisLabelsAlignment(axis, rotation)[source]
return a “smart” alignment for the axis labels depending on the axis and the label rotation
- Parameters:
axis (qwt.QwtPlot.Axis) – the axis
rotation (float) – The rotation (in degrees, clockwise-positive)
- Returns:
an alignment
- Return type:
Qt.Alignment