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


Python MatplotlibWidget.setFont方法代码示例

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


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

示例1: Ui_MainWindow

# 需要导入模块: from matplotlibwidget import MatplotlibWidget [as 别名]
# 或者: from matplotlibwidget.MatplotlibWidget import setFont [as 别名]
class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(1024, 768)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.impulseMatplotlibwidget = MatplotlibWidget(self.centralwidget)
        self.impulseMatplotlibwidget.setGeometry(QtCore.QRect(10, 180, 491, 251))
        self.impulseMatplotlibwidget.setAutoFillBackground(False)
        self.impulseMatplotlibwidget.setStyleSheet(_fromUtf8("MatplotlibWidget{\n"
"border-width: 0px;\n"
"}\n"
""))
        self.impulseMatplotlibwidget.setObjectName(_fromUtf8("impulseMatplotlibwidget"))
        self.freqResponseMatplotlibwidget = MatplotlibWidget(self.centralwidget)
        self.freqResponseMatplotlibwidget.setGeometry(QtCore.QRect(10, 430, 1001, 301))
        font = QtGui.QFont()
        font.setPointSize(7)
        self.freqResponseMatplotlibwidget.setFont(font)
        self.freqResponseMatplotlibwidget.setStyleSheet(_fromUtf8("MatplotlibWidget{\n"
"border-width: 0px;\n"
"}"))
        self.freqResponseMatplotlibwidget.setObjectName(_fromUtf8("freqResponseMatplotlibwidget"))
        self.bandStartHorizontalSlider = QtGui.QSlider(self.centralwidget)
        self.bandStartHorizontalSlider.setGeometry(QtCore.QRect(50, 50, 161, 16))
        self.bandStartHorizontalSlider.setMaximum(50)
        self.bandStartHorizontalSlider.setOrientation(QtCore.Qt.Horizontal)
        self.bandStartHorizontalSlider.setObjectName(_fromUtf8("bandStartHorizontalSlider"))
        self.bandEndHorizontalSlider = QtGui.QSlider(self.centralwidget)
        self.bandEndHorizontalSlider.setGeometry(QtCore.QRect(50, 100, 161, 16))
        self.bandEndHorizontalSlider.setMaximum(50)
        self.bandEndHorizontalSlider.setOrientation(QtCore.Qt.Horizontal)
        self.bandEndHorizontalSlider.setObjectName(_fromUtf8("bandEndHorizontalSlider"))
        self.bandLevelVerticalSlider = QtGui.QSlider(self.centralwidget)
        self.bandLevelVerticalSlider.setGeometry(QtCore.QRect(230, 50, 20, 71))
        self.bandLevelVerticalSlider.setMaximum(100)
        self.bandLevelVerticalSlider.setOrientation(QtCore.Qt.Vertical)
        self.bandLevelVerticalSlider.setObjectName(_fromUtf8("bandLevelVerticalSlider"))
        self.bandStart = QtGui.QDoubleSpinBox(self.centralwidget)
        self.bandStart.setGeometry(QtCore.QRect(50, 130, 62, 22))
        self.bandStart.setDecimals(4)
        self.bandStart.setMaximum(0.5)
        self.bandStart.setSingleStep(0.01)
        self.bandStart.setObjectName(_fromUtf8("bandStart"))
        self.bandEnd = QtGui.QDoubleSpinBox(self.centralwidget)
        self.bandEnd.setGeometry(QtCore.QRect(120, 130, 62, 22))
        self.bandEnd.setDecimals(4)
        self.bandEnd.setMaximum(0.5)
        self.bandEnd.setSingleStep(0.01)
        self.bandEnd.setObjectName(_fromUtf8("bandEnd"))
        self.bandLevel = QtGui.QDoubleSpinBox(self.centralwidget)
        self.bandLevel.setGeometry(QtCore.QRect(190, 130, 62, 22))
        self.bandLevel.setDecimals(4)
        self.bandLevel.setMaximum(1.0)
        self.bandLevel.setSingleStep(0.01)
        self.bandLevel.setObjectName(_fromUtf8("bandLevel"))
        self.bandEnd_2 = QtGui.QDoubleSpinBox(self.centralwidget)
        self.bandEnd_2.setGeometry(QtCore.QRect(360, 130, 62, 22))
        self.bandEnd_2.setDecimals(4)
        self.bandEnd_2.setMaximum(0.5)
        self.bandEnd_2.setSingleStep(0.01)
        self.bandEnd_2.setObjectName(_fromUtf8("bandEnd_2"))
        self.bandEndHorizontalSlider_2 = QtGui.QSlider(self.centralwidget)
        self.bandEndHorizontalSlider_2.setGeometry(QtCore.QRect(290, 100, 161, 16))
        self.bandEndHorizontalSlider_2.setMaximum(50)
        self.bandEndHorizontalSlider_2.setOrientation(QtCore.Qt.Horizontal)
        self.bandEndHorizontalSlider_2.setObjectName(_fromUtf8("bandEndHorizontalSlider_2"))
        self.bandLevelVerticalSlider_2 = QtGui.QSlider(self.centralwidget)
        self.bandLevelVerticalSlider_2.setGeometry(QtCore.QRect(470, 50, 20, 71))
        self.bandLevelVerticalSlider_2.setMaximum(100)
        self.bandLevelVerticalSlider_2.setOrientation(QtCore.Qt.Vertical)
        self.bandLevelVerticalSlider_2.setObjectName(_fromUtf8("bandLevelVerticalSlider_2"))
        self.bandLevel_2 = QtGui.QDoubleSpinBox(self.centralwidget)
        self.bandLevel_2.setGeometry(QtCore.QRect(430, 130, 62, 22))
        self.bandLevel_2.setDecimals(4)
        self.bandLevel_2.setMaximum(1.0)
        self.bandLevel_2.setSingleStep(0.01)
        self.bandLevel_2.setObjectName(_fromUtf8("bandLevel_2"))
        self.bandStart_2 = QtGui.QDoubleSpinBox(self.centralwidget)
        self.bandStart_2.setGeometry(QtCore.QRect(290, 130, 62, 22))
        self.bandStart_2.setDecimals(4)
        self.bandStart_2.setMaximum(0.5)
        self.bandStart_2.setSingleStep(0.01)
        self.bandStart_2.setObjectName(_fromUtf8("bandStart_2"))
        self.bandStartHorizontalSlider_2 = QtGui.QSlider(self.centralwidget)
        self.bandStartHorizontalSlider_2.setGeometry(QtCore.QRect(290, 50, 161, 16))
        self.bandStartHorizontalSlider_2.setMaximum(50)
        self.bandStartHorizontalSlider_2.setOrientation(QtCore.Qt.Horizontal)
        self.bandStartHorizontalSlider_2.setObjectName(_fromUtf8("bandStartHorizontalSlider_2"))
        self.bandEnd_3 = QtGui.QDoubleSpinBox(self.centralwidget)
        self.bandEnd_3.setGeometry(QtCore.QRect(600, 130, 62, 22))
        self.bandEnd_3.setDecimals(4)
        self.bandEnd_3.setMaximum(0.5)
        self.bandEnd_3.setSingleStep(0.01)
        self.bandEnd_3.setObjectName(_fromUtf8("bandEnd_3"))
        self.bandEndHorizontalSlider_3 = QtGui.QSlider(self.centralwidget)
        self.bandEndHorizontalSlider_3.setGeometry(QtCore.QRect(530, 100, 161, 16))
        self.bandEndHorizontalSlider_3.setMaximum(50)
        self.bandEndHorizontalSlider_3.setOrientation(QtCore.Qt.Horizontal)
        self.bandEndHorizontalSlider_3.setObjectName(_fromUtf8("bandEndHorizontalSlider_3"))
#.........这里部分代码省略.........
开发者ID:jniemann66,项目名称:FIRCalculator,代码行数:103,代码来源:FIRDesigner.py

示例2: Ui_FridgeMonitorWindow

# 需要导入模块: from matplotlibwidget import MatplotlibWidget [as 别名]
# 或者: from matplotlibwidget.MatplotlibWidget import setFont [as 别名]
class Ui_FridgeMonitorWindow(object):
    def setupUi(self, FridgeMonitorWindow):
        FridgeMonitorWindow.setObjectName(_fromUtf8("FridgeMonitorWindow"))
        FridgeMonitorWindow.resize(1249, 714)
        FridgeMonitorWindow.setWindowTitle(QtGui.QApplication.translate("FridgeMonitorWindow", "Thermometry", None, QtGui.QApplication.UnicodeUTF8))
        self.centralwidget = QtGui.QWidget(FridgeMonitorWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.horizontalLayout_4 = QtGui.QHBoxLayout(self.centralwidget)
        self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4"))
        self.mplwidget = MatplotlibWidget(self.centralwidget)
        font = QtGui.QFont()
        font.setPointSize(6)
        self.mplwidget.setFont(font)
        self.mplwidget.setObjectName(_fromUtf8("mplwidget"))
        self.horizontalLayout_4.addWidget(self.mplwidget)
        self.frame = QtGui.QFrame(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.frame.sizePolicy().hasHeightForWidth())
        self.frame.setSizePolicy(sizePolicy)
        self.frame.setFrameShape(QtGui.QFrame.StyledPanel)
        self.frame.setFrameShadow(QtGui.QFrame.Raised)
        self.frame.setObjectName(_fromUtf8("frame"))
        self.verticalLayout = QtGui.QVBoxLayout(self.frame)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.fileNameLabel = QtGui.QLabel(self.frame)
        self.fileNameLabel.setText(QtGui.QApplication.translate("FridgeMonitorWindow", "File:", None, QtGui.QApplication.UnicodeUTF8))
        self.fileNameLabel.setObjectName(_fromUtf8("fileNameLabel"))
        self.horizontalLayout.addWidget(self.fileNameLabel)
        self.fileNameLineEdit = QtGui.QLineEdit(self.frame)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.fileNameLineEdit.sizePolicy().hasHeightForWidth())
        self.fileNameLineEdit.setSizePolicy(sizePolicy)
        self.fileNameLineEdit.setObjectName(_fromUtf8("fileNameLineEdit"))
        self.horizontalLayout.addWidget(self.fileNameLineEdit)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.startStopButton = QtGui.QPushButton(self.frame)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.startStopButton.sizePolicy().hasHeightForWidth())
        self.startStopButton.setSizePolicy(sizePolicy)
        self.startStopButton.setMaximumSize(QtCore.QSize(150, 16777215))
        self.startStopButton.setText(QtGui.QApplication.translate("FridgeMonitorWindow", "Start", None, QtGui.QApplication.UnicodeUTF8))
        self.startStopButton.setObjectName(_fromUtf8("startStopButton"))
        self.verticalLayout.addWidget(self.startStopButton)
        self.alarmCheckBox = QtGui.QCheckBox(self.frame)
        self.alarmCheckBox.setText(QtGui.QApplication.translate("FridgeMonitorWindow", "Send text messages", None, QtGui.QApplication.UnicodeUTF8))
        self.alarmCheckBox.setObjectName(_fromUtf8("alarmCheckBox"))
        self.verticalLayout.addWidget(self.alarmCheckBox)
        self.horizontalLayout_3 = QtGui.QHBoxLayout()
        self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
        self.htrOutputLabel = QtGui.QLabel(self.frame)
        self.htrOutputLabel.setText(QtGui.QApplication.translate("FridgeMonitorWindow", "Heater output:", None, QtGui.QApplication.UnicodeUTF8))
        self.htrOutputLabel.setObjectName(_fromUtf8("htrOutputLabel"))
        self.horizontalLayout_3.addWidget(self.htrOutputLabel)
        self.htrOutputLineEdit = QtGui.QLineEdit(self.frame)
        self.htrOutputLineEdit.setMaximumSize(QtCore.QSize(100, 16777215))
        self.htrOutputLineEdit.setObjectName(_fromUtf8("htrOutputLineEdit"))
        self.horizontalLayout_3.addWidget(self.htrOutputLineEdit)
        self.verticalLayout.addLayout(self.horizontalLayout_3)
        self.horizontalLayout_2 = QtGui.QHBoxLayout()
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        self.htrRangeLabel = QtGui.QLabel(self.frame)
        self.htrRangeLabel.setText(QtGui.QApplication.translate("FridgeMonitorWindow", "Heater Range:", None, QtGui.QApplication.UnicodeUTF8))
        self.htrRangeLabel.setObjectName(_fromUtf8("htrRangeLabel"))
        self.horizontalLayout_2.addWidget(self.htrRangeLabel)
        self.htrRangeComboBox = QtGui.QComboBox(self.frame)
        self.htrRangeComboBox.setObjectName(_fromUtf8("htrRangeComboBox"))
        self.htrRangeComboBox.addItem(_fromUtf8(""))
        self.htrRangeComboBox.setItemText(0, QtGui.QApplication.translate("FridgeMonitorWindow", "OFF", None, QtGui.QApplication.UnicodeUTF8))
        self.htrRangeComboBox.addItem(_fromUtf8(""))
        self.htrRangeComboBox.setItemText(1, QtGui.QApplication.translate("FridgeMonitorWindow", "31.6 uA", None, QtGui.QApplication.UnicodeUTF8))
        self.htrRangeComboBox.addItem(_fromUtf8(""))
        self.htrRangeComboBox.setItemText(2, QtGui.QApplication.translate("FridgeMonitorWindow", "100 uA", None, QtGui.QApplication.UnicodeUTF8))
        self.htrRangeComboBox.addItem(_fromUtf8(""))
        self.htrRangeComboBox.setItemText(3, QtGui.QApplication.translate("FridgeMonitorWindow", "316 uA", None, QtGui.QApplication.UnicodeUTF8))
        self.htrRangeComboBox.addItem(_fromUtf8(""))
        self.htrRangeComboBox.setItemText(4, QtGui.QApplication.translate("FridgeMonitorWindow", "1.00 mA", None, QtGui.QApplication.UnicodeUTF8))
        self.htrRangeComboBox.addItem(_fromUtf8(""))
        self.htrRangeComboBox.setItemText(5, QtGui.QApplication.translate("FridgeMonitorWindow", "3.16 mA", None, QtGui.QApplication.UnicodeUTF8))
        self.htrRangeComboBox.addItem(_fromUtf8(""))
        self.htrRangeComboBox.setItemText(6, QtGui.QApplication.translate("FridgeMonitorWindow", "10.0 mA", None, QtGui.QApplication.UnicodeUTF8))
        self.htrRangeComboBox.addItem(_fromUtf8(""))
        self.htrRangeComboBox.setItemText(7, QtGui.QApplication.translate("FridgeMonitorWindow", "31.6 mA", None, QtGui.QApplication.UnicodeUTF8))
        self.htrRangeComboBox.addItem(_fromUtf8(""))
        self.htrRangeComboBox.setItemText(8, QtGui.QApplication.translate("FridgeMonitorWindow", "100 mA", None, QtGui.QApplication.UnicodeUTF8))
        self.horizontalLayout_2.addWidget(self.htrRangeComboBox)
        self.verticalLayout.addLayout(self.horizontalLayout_2)
        spacerItem = QtGui.QSpacerItem(20, 496, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.horizontalLayout_4.addWidget(self.frame)
        FridgeMonitorWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(FridgeMonitorWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1249, 21))
#.........这里部分代码省略.........
开发者ID:Keyanb,项目名称:g2python,代码行数:103,代码来源:ui_fridgemonitor.py


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