本文整理汇总了Python中PyQt4.Qwt5.QwtPlot.setAxisFont方法的典型用法代码示例。如果您正苦于以下问题:Python QwtPlot.setAxisFont方法的具体用法?Python QwtPlot.setAxisFont怎么用?Python QwtPlot.setAxisFont使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.Qwt5.QwtPlot
的用法示例。
在下文中一共展示了QwtPlot.setAxisFont方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ImageControlDialog
# 需要导入模块: from PyQt4.Qwt5 import QwtPlot [as 别名]
# 或者: from PyQt4.Qwt5.QwtPlot import setAxisFont [as 别名]
#.........这里部分代码省略.........
self.color = color = color if isinstance(color, QColor) else QColor(color)
self.line.setPen(QPen(color, linewidth, linestyle))
self.marker = TiggerPlotMarker()
self.marker.setLabelAlignment(align)
try:
self.marker.setSpacing(spacing)
except AttributeError:
pass
self.setText(label)
self.line.setZ(z)
self.marker.setZ(zlabel if zlabel is not None else z)
# set axes -- using yRight, since that is the "markup" z-axis
self.line.setAxis(QwtPlot.xBottom, yaxis)
self.marker.setAxis(QwtPlot.xBottom, yaxis)
# attach to plot
self.line.attach(plot)
self.marker.attach(plot)
def show(self):
self.line.show()
self.marker.show()
def hide(self):
self.line.hide()
self.marker.hide()
def setText(self, text):
label = QwtText(text)
label.setColor(self.color)
self.marker.setLabel(label)
def _setupHistogramPlot(self):
self._histplot.setCanvasBackground(QColor("lightgray"))
self._histplot.setAxisFont(QwtPlot.yLeft, QApplication.font())
self._histplot.setAxisFont(QwtPlot.xBottom, QApplication.font())
# add histogram curves
self._histcurve1 = TiggerPlotCurve()
self._histcurve2 = TiggerPlotCurve()
self._histcurve1.setStyle(QwtPlotCurve.Steps)
self._histcurve2.setStyle(QwtPlotCurve.Steps)
self._histcurve1.setPen(QPen(Qt.NoPen))
self._histcurve1.setBrush(QBrush(QColor("slategrey")))
pen = QPen(QColor("red"))
pen.setWidth(1)
self._histcurve2.setPen(pen)
self._histcurve1.setZ(0)
self._histcurve2.setZ(100)
# self._histcurve1.attach(self._histplot)
self._histcurve2.attach(self._histplot)
# add maxbin and half-max curves
self._line_0 = self.HistogramLineMarker(self._histplot, color="grey50", linestyle=Qt.SolidLine,
align=Qt.AlignTop | Qt.AlignLeft, z=90)
self._line_mean = self.HistogramLineMarker(self._histplot, color="black", linestyle=Qt.SolidLine,
align=Qt.AlignBottom | Qt.AlignRight, z=91,
label="mean", zlabel=151)
self._line_std = self.HistogramLineMarker(self._histplot, color="black", linestyle=Qt.SolidLine,
align=Qt.AlignTop | Qt.AlignRight, z=91,
label="std", zlabel=151)
sym = QwtSymbol()
sym.setStyle(QwtSymbol.VLine)
sym.setSize(8)
self._line_std.line.setSymbol(sym)
self._line_maxbin = self.HistogramLineMarker(self._histplot, color="green", linestyle=Qt.DotLine,
align=Qt.AlignTop | Qt.AlignRight, z=92,
label="max bin", zlabel=150)
self._line_halfmax = self.HistogramLineMarker(self._histplot, color="green", linestyle=Qt.DotLine,