当前位置: 首页>>代码示例>>Python>>正文


Python PlotWidget.setLineWidth方法代码示例

本文整理汇总了Python中pyqtgraph.PlotWidget.setLineWidth方法的典型用法代码示例。如果您正苦于以下问题:Python PlotWidget.setLineWidth方法的具体用法?Python PlotWidget.setLineWidth怎么用?Python PlotWidget.setLineWidth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pyqtgraph.PlotWidget的用法示例。


在下文中一共展示了PlotWidget.setLineWidth方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: Ui_MainWidget

# 需要导入模块: from pyqtgraph import PlotWidget [as 别名]
# 或者: from pyqtgraph.PlotWidget import setLineWidth [as 别名]
class Ui_MainWidget(object):
    def setupUi(self, MainWidget):
        MainWidget.setObjectName(_fromUtf8("MainWidget"))
        MainWidget.resize(791, 488)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.MinimumExpanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(MainWidget.sizePolicy().hasHeightForWidth())
        MainWidget.setSizePolicy(sizePolicy)
        MainWidget.setMinimumSize(QtCore.QSize(170, 0))
        MainWidget.setMaximumSize(QtCore.QSize(16777215, 16777215))
        MainWidget.setStyleSheet(_fromUtf8("background-color: rgb(0, 0, 0);\n"
"color: rgb(255, 255, 255);\n"
"font: 10pt \"Droid Sans Mono\";"))
        self.horizontalLayout_2 = QtGui.QHBoxLayout(MainWidget)
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        self.horizontalLayout_8 = QtGui.QHBoxLayout()
        self.horizontalLayout_8.setObjectName(_fromUtf8("horizontalLayout_8"))
        self.plotVertLayout = QtGui.QVBoxLayout()
        self.plotVertLayout.setObjectName(_fromUtf8("plotVertLayout"))
        self.vitalsPlot = PlotWidget(MainWidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.vitalsPlot.sizePolicy().hasHeightForWidth())
        self.vitalsPlot.setSizePolicy(sizePolicy)
        self.vitalsPlot.setMinimumSize(QtCore.QSize(150, 8))
        self.vitalsPlot.setStyleSheet(_fromUtf8("background-color: rgb(170, 0, 0);"))
        self.vitalsPlot.setFrameShape(QtGui.QFrame.NoFrame)
        self.vitalsPlot.setFrameShadow(QtGui.QFrame.Plain)
        self.vitalsPlot.setLineWidth(0)
        self.vitalsPlot.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
        self.vitalsPlot.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
        self.vitalsPlot.setObjectName(_fromUtf8("vitalsPlot"))
        self.plotVertLayout.addWidget(self.vitalsPlot)
        self.slowPlotHorizLayout = QtGui.QHBoxLayout()
        self.slowPlotHorizLayout.setObjectName(_fromUtf8("slowPlotHorizLayout"))
        self.textBrowser = QtGui.QTextBrowser(MainWidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.textBrowser.sizePolicy().hasHeightForWidth())
        self.textBrowser.setSizePolicy(sizePolicy)
        self.textBrowser.setMinimumSize(QtCore.QSize(136, 30))
        self.textBrowser.setMaximumSize(QtCore.QSize(136, 30))
        self.textBrowser.setStyleSheet(_fromUtf8("font: 9pt \"Droid Sans\";"))
        self.textBrowser.setFrameShape(QtGui.QFrame.NoFrame)
        self.textBrowser.setFrameShadow(QtGui.QFrame.Plain)
        self.textBrowser.setLineWidth(0)
        self.textBrowser.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
        self.textBrowser.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
        self.textBrowser.setObjectName(_fromUtf8("textBrowser"))
        self.slowPlotHorizLayout.addWidget(self.textBrowser)
        self.slowUpdatePeriod = QtGui.QDoubleSpinBox(MainWidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.slowUpdatePeriod.sizePolicy().hasHeightForWidth())
        self.slowUpdatePeriod.setSizePolicy(sizePolicy)
        self.slowUpdatePeriod.setMinimumSize(QtCore.QSize(150, 0))
        self.slowUpdatePeriod.setMaximumSize(QtCore.QSize(150, 16777215))
        self.slowUpdatePeriod.setStyleSheet(_fromUtf8("background-color: rgb(255,255,255);\n"
"font: 9pt \"Droid Sans\";\n"
"color: rgb(0, 0, 0);"))
        self.slowUpdatePeriod.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.slowUpdatePeriod.setDecimals(1)
        self.slowUpdatePeriod.setMinimum(0.1)
        self.slowUpdatePeriod.setMaximum(1000000000.0)
        self.slowUpdatePeriod.setProperty("value", 1.0)
        self.slowUpdatePeriod.setObjectName(_fromUtf8("slowUpdatePeriod"))
        self.slowPlotHorizLayout.addWidget(self.slowUpdatePeriod)
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.slowPlotHorizLayout.addItem(spacerItem)
        self.plotVertLayout.addLayout(self.slowPlotHorizLayout)
        self.ventilationPlot = PlotWidget(MainWidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.MinimumExpanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.ventilationPlot.sizePolicy().hasHeightForWidth())
        self.ventilationPlot.setSizePolicy(sizePolicy)
        self.ventilationPlot.setMinimumSize(QtCore.QSize(150, 10))
        self.ventilationPlot.setStyleSheet(_fromUtf8("background-color: rgb(255, 0, 255);"))
        self.ventilationPlot.setFrameShape(QtGui.QFrame.NoFrame)
        self.ventilationPlot.setFrameShadow(QtGui.QFrame.Plain)
        self.ventilationPlot.setLineWidth(0)
        self.ventilationPlot.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
        self.ventilationPlot.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
        self.ventilationPlot.setObjectName(_fromUtf8("pressurePlot"))
        self.plotVertLayout.addWidget(self.ventilationPlot)
        self.ecgPlot = PlotWidget(MainWidget)
        self.ecgPlot.setMinimumSize(QtCore.QSize(150, 0))
        self.ecgPlot.setStyleSheet(_fromUtf8("background-color: rgb(0, 170, 0);"))
        self.ecgPlot.setFrameShape(QtGui.QFrame.NoFrame)
        self.ecgPlot.setFrameShadow(QtGui.QFrame.Plain)
        self.ecgPlot.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
        self.ecgPlot.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
        self.ecgPlot.setObjectName(_fromUtf8("ecgPlot"))
        self.plotVertLayout.addWidget(self.ecgPlot)
        self.fastPlotHorizLayout = QtGui.QHBoxLayout()
        self.fastPlotHorizLayout.setObjectName(_fromUtf8("fastPlotHorizLayout"))
#.........这里部分代码省略.........
开发者ID:ScottHaileRobertson,项目名称:DukeVentilator,代码行数:103,代码来源:mainwidget.py

示例2: Ui_MainWindow

# 需要导入模块: from pyqtgraph import PlotWidget [as 别名]
# 或者: from pyqtgraph.PlotWidget import setLineWidth [as 别名]

#.........这里部分代码省略.........
        self.verticalLayout.setMargin(0)
        self.verticalLayout.setSpacing(10)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.frame_2 = QtGui.QFrame(self.frame)
        self.frame_2.setFrameShape(QtGui.QFrame.StyledPanel)
        self.frame_2.setFrameShadow(QtGui.QFrame.Raised)
        self.frame_2.setObjectName(_fromUtf8("frame_2"))
        self.horizontalLayout_2 = QtGui.QHBoxLayout(self.frame_2)
        self.horizontalLayout_2.setMargin(0)
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        self.chkInvert = QtGui.QCheckBox(self.frame_2)
        self.chkInvert.setObjectName(_fromUtf8("chkInvert"))
        self.horizontalLayout_2.addWidget(self.chkInvert)
        self.chkAutoscale = QtGui.QCheckBox(self.frame_2)
        self.chkAutoscale.setChecked(True)
        self.chkAutoscale.setObjectName(_fromUtf8("chkAutoscale"))
        self.horizontalLayout_2.addWidget(self.chkAutoscale)
        self.line = QtGui.QFrame(self.frame_2)
        self.line.setFrameShape(QtGui.QFrame.VLine)
        self.line.setFrameShadow(QtGui.QFrame.Sunken)
        self.line.setObjectName(_fromUtf8("line"))
        self.horizontalLayout_2.addWidget(self.line)
        self.label_2 = QtGui.QLabel(self.frame_2)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
        self.label_2.setSizePolicy(sizePolicy)
        self.label_2.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.horizontalLayout_2.addWidget(self.label_2)
        self.spinLowpass = QtGui.QSpinBox(self.frame_2)
        self.spinLowpass.setPrefix(_fromUtf8(""))
        self.spinLowpass.setMinimum(0)
        self.spinLowpass.setMaximum(999999)
        self.spinLowpass.setSingleStep(1)
        self.spinLowpass.setProperty("value", 45)
        self.spinLowpass.setObjectName(_fromUtf8("spinLowpass"))
        self.horizontalLayout_2.addWidget(self.spinLowpass)
        self.label_5 = QtGui.QLabel(self.frame_2)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label_5.sizePolicy().hasHeightForWidth())
        self.label_5.setSizePolicy(sizePolicy)
        self.label_5.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self.horizontalLayout_2.addWidget(self.label_5)
        self.lineTitle = QtGui.QLineEdit(self.frame_2)
        self.lineTitle.setObjectName(_fromUtf8("lineTitle"))
        self.horizontalLayout_2.addWidget(self.lineTitle)
        self.line_2 = QtGui.QFrame(self.frame_2)
        self.line_2.setFrameShape(QtGui.QFrame.VLine)
        self.line_2.setFrameShadow(QtGui.QFrame.Sunken)
        self.line_2.setObjectName(_fromUtf8("line_2"))
        self.horizontalLayout_2.addWidget(self.line_2)
        self.btnPause = QtGui.QPushButton(self.frame_2)
        self.btnPause.setCheckable(True)
        self.btnPause.setObjectName(_fromUtf8("btnPause"))
        self.horizontalLayout_2.addWidget(self.btnPause)
        self.btnSave = QtGui.QPushButton(self.frame_2)
        self.btnSave.setObjectName(_fromUtf8("btnSave"))
        self.horizontalLayout_2.addWidget(self.btnSave)
        self.verticalLayout.addWidget(self.frame_2)
        self.frame_3 = QtGui.QFrame(self.frame)
        self.frame_3.setFrameShape(QtGui.QFrame.StyledPanel)
        self.frame_3.setFrameShadow(QtGui.QFrame.Plain)
        self.frame_3.setObjectName(_fromUtf8("frame_3"))
        self.verticalLayout_3 = QtGui.QVBoxLayout(self.frame_3)
        self.verticalLayout_3.setMargin(0)
        self.verticalLayout_3.setSpacing(0)
        self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
        self.grECG = PlotWidget(self.frame_3)
        self.grECG.setFrameShape(QtGui.QFrame.NoFrame)
        self.grECG.setFrameShadow(QtGui.QFrame.Plain)
        self.grECG.setLineWidth(0)
        self.grECG.setObjectName(_fromUtf8("grECG"))
        self.verticalLayout_3.addWidget(self.grECG)
        self.verticalLayout.addWidget(self.frame_3)
        self.verticalLayout_2.addWidget(self.frame)
        MainWindow.setCentralWidget(self.centralwidget)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(_translate("MainWindow", "diyECG", None))
        self.label_3.setText(_translate("MainWindow", "diyECG", None))
        self.label_4.setText(_translate("MainWindow", "   open-source live soundcard monitor with realtime iFFT filtering by Scott Harden", None))
        self.btnSite.setText(_translate("MainWindow", "www.SWHarden.com", None))
        self.lblDevice.setText(_translate("MainWindow", "!!! ERROR !!! no valid input sound devices found. Plug in a microphone and restart this program!", None))
        self.chkInvert.setText(_translate("MainWindow", "invert", None))
        self.chkAutoscale.setText(_translate("MainWindow", "autoscale", None))
        self.label_2.setText(_translate("MainWindow", "lowpass:", None))
        self.spinLowpass.setToolTip(_translate("MainWindow", "set to 0 to disable", None))
        self.spinLowpass.setSuffix(_translate("MainWindow", " Hz", None))
        self.label_5.setText(_translate("MainWindow", "title:", None))
        self.lineTitle.setText(_translate("MainWindow", "DIY ECG", None))
        self.btnPause.setText(_translate("MainWindow", "Pause", None))
        self.btnSave.setText(_translate("MainWindow", "Save Figure", None))
开发者ID:godzivan,项目名称:diyECG-1opAmp,代码行数:104,代码来源:ui_main.py


注:本文中的pyqtgraph.PlotWidget.setLineWidth方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。