PlotItem (finally) gets log scaling

Also cleaned up some context menu items
This commit is contained in:
Luke Campagnola 2012-04-21 15:57:47 -04:00
parent 8b721e7d78
commit f8758dba39
6 changed files with 269 additions and 81 deletions

View File

@ -35,18 +35,20 @@ p3.plot(np.random.normal(size=100), pen=(200,200,200), symbolBrush=(255,0,0), sy
win.nextRow()
p4 = win.addPlot(title="Parametric")
p4 = win.addPlot(title="Parametric, grid enabled")
x = np.cos(np.linspace(0, 2*np.pi, 1000))
y = np.sin(np.linspace(0, 4*np.pi, 1000))
p4.plot(x, y)
p4.showGrid(x=True, y=True)
p5 = win.addPlot(title="Scatter plot with labels")
p5 = win.addPlot(title="Scatter plot, axis labels, log scale")
x = np.random.normal(size=1000) * 1e-5
y = x*1000 + 0.005 * np.random.normal(size=1000)
y -= y.min()-1.0
p5.plot(x, y, pen=None, symbol='t', symbolPen=None, symbolSize=10, symbolBrush=(100, 100, 255, 50))
p5.setLabel('left', "Y Axis", units='A')
p5.setLabel('bottom', "Y Axis", units='s')
p5.setLogMode(x=True, y=False)
p6 = win.addPlot(title="Updating plot")
curve = p6.plot(pen='y')
@ -65,9 +67,10 @@ timer.start(50)
win.nextRow()
p7 = win.addPlot(title="Filled plot")
p7 = win.addPlot(title="Filled plot, axis disabled")
y = np.sin(np.linspace(0, 10, 1000)) + np.random.normal(size=1000, scale=0.1)
p7.plot(y, fillLevel=-0.3, brush=(50,50,200,100))
p7.showAxis('bottom', False)
x2 = np.linspace(-100, 100, 1000)

38
examples/logAxis.py Normal file
View File

@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
import initExample ## Add path to library (just for examples; you do not need this)
import numpy as np
from pyqtgraph.Qt import QtGui, QtCore
import pyqtgraph as pg
app = QtGui.QApplication([])
w = pg.GraphicsWindow()
p1 = w.addPlot(0,0, title="X Semilog")
p2 = w.addPlot(1,0, title="Y Semilog")
p3 = w.addPlot(2,0, title="XY Log")
p1.showGrid(True, True)
p2.showGrid(True, True)
p3.showGrid(True, True)
p1.setLogMode(True, False)
p2.setLogMode(False, True)
p3.setLogMode(True, True)
w.show()
y = np.random.normal(size=1000)
x = np.linspace(0, 1, 1000)
p1.plot(x, y)
p2.plot(x, y)
p3.plot(x, y)
#p.getAxis('bottom').setLogMode(True)
## Start Qt event loop unless running in interactive mode or using pyside.
import sys
if (sys.flags.interactive != 1) or not hasattr(QtCore, 'PYQT_VERSION'):
app.exec_()

View File

@ -43,6 +43,7 @@ class AxisItem(GraphicsWidget):
self.labelUnits = ''
self.labelUnitPrefix=''
self.labelStyle = {'color': '#CCC'}
self.logMode = False
self.textHeight = 18
self.tickLength = maxTickLength
@ -76,6 +77,10 @@ class AxisItem(GraphicsWidget):
self.prepareGeometryChange()
self.update()
def setLogMode(self, log):
self.logMode = log
self.picture = None
self.update()
def resizeEvent(self, ev=None):
#s = self.size()
@ -316,6 +321,9 @@ class AxisItem(GraphicsWidget):
By default, this method calls tickSpacing to determine the correct tick locations.
This is a good method to override in subclasses.
"""
if self.logMode:
return self.logTickValues(minVal, maxVal, size)
ticks = []
tickLevels = self.tickSpacing(minVal, maxVal, size)
for i in range(len(tickLevels)):
@ -329,6 +337,16 @@ class AxisItem(GraphicsWidget):
ticks.append((spacing, np.arange(num) * spacing + start))
return ticks
def logTickValues(self, minVal, maxVal, size):
v1 = int(np.floor(minVal))
v2 = int(np.ceil(maxVal))
major = range(v1+1, v2)
minor = []
for v in range(v1, v2):
minor.extend(v + np.log10(np.arange(1, 10)))
minor = filter(lambda x: x>minVal and x<maxVal, minor)
return [(1.0, major), (None, minor)]
def tickStrings(self, values, scale, spacing):
"""Return the strings that should be placed next to ticks. This method is called
@ -343,6 +361,9 @@ class AxisItem(GraphicsWidget):
be accompanied by a scale value of 1000. This indicates that the label is displaying 'mV', and
thus the tick should display 0.001 * 1000 = 1.
"""
if self.logMode:
return self.logTickStrings(values, scale, spacing)
places = max(0, np.ceil(-np.log10(spacing*scale)))
strings = []
for v in values:
@ -354,6 +375,9 @@ class AxisItem(GraphicsWidget):
strings.append(vstr)
return strings
def logTickStrings(self, values, scale, spacing):
return ["%0.1g"%x for x in 10 ** np.array(values).astype(float)]
def drawPicture(self, p):
p.setRenderHint(p.Antialiasing, False)
@ -458,6 +482,8 @@ class AxisItem(GraphicsWidget):
## take a small sample of strings and measure their rendered text
spacing, values = tickLevels[i]
strings = self.tickStrings(values[:2], self.scale, spacing)
if len(strings) == 0:
continue
textRects = [p.boundingRect(QtCore.QRectF(0, 0, 100, 100), QtCore.Qt.AlignCenter, s) for s in strings]
if axis == 0:
textSize = np.max([r.height() for r in textRects])

View File

@ -208,7 +208,7 @@ class PlotItem(GraphicsWidget):
dv = QtGui.QDoubleValidator(self)
menuItems = [
('Fourier Transform', c.powerSpectrumGroup),
('Transforms', c.transformGroup),
('Downsample', c.decimateGroup),
('Average', c.averageGroup),
('Alpha', c.alphaGroup),
@ -272,10 +272,13 @@ class PlotItem(GraphicsWidget):
c.alphaSlider.valueChanged.connect(self.updateAlpha)
c.autoAlphaCheck.toggled.connect(self.updateAlpha)
c.gridGroup.toggled.connect(self.updateGrid)
c.xGridCheck.toggled.connect(self.updateGrid)
c.yGridCheck.toggled.connect(self.updateGrid)
c.gridAlphaSlider.valueChanged.connect(self.updateGrid)
c.powerSpectrumGroup.toggled.connect(self.updateSpectrumMode)
c.fftCheck.toggled.connect(self.updateSpectrumMode)
c.logXCheck.toggled.connect(self.updateLogMode)
c.logYCheck.toggled.connect(self.updateLogMode)
#c.saveSvgBtn.clicked.connect(self.saveSvgClicked)
#c.saveSvgCurvesBtn.clicked.connect(self.saveSvgCurvesClicked)
#c.saveImgBtn.clicked.connect(self.saveImgClicked)
@ -332,6 +335,40 @@ class PlotItem(GraphicsWidget):
"""Return the ViewBox within."""
return self.vb
def setLogMode(self, x, y):
"""
Set log scaling for x and y axes.
This informs PlotDataItems to transform logarithmically and switches
the axes to use log ticking.
Note that *no other items* in the scene will be affected by
this; there is no generic way to redisplay a GraphicsItem
with log coordinates.
"""
self.ctrl.logXCheck.setChecked(x)
self.ctrl.logYCheck.setChecked(y)
def showGrid(self, x=None, y=None, alpha=None):
"""
Show or hide the grid for either axis.
============== =====================================
**Arguments:**
x (bool) Whether to show the X grid
y (bool) Whether to show the Y grid
alpha (0.0-1.0) Opacity of the grid
"""
if x is None and y is None and alpha is None:
raise Exception("Must specify at least one of x, y, or alpha.") ## prevent people getting confused if they just call showGrid()
if x is not None:
self.ctrl.xGridCheck.setChecked(x)
if y is not None:
self.ctrl.yGridCheck.setChecked(y)
if alpha is not None:
v = np.clip(alpha, 0, 1)*self.ctrl.gridAlphaSlider.maximum()
self.ctrl.gridAlphaSlider.setValue(v)
#def paint(self, *args):
#prof = debug.Profiler('PlotItem.paint', disabled=True)
@ -432,11 +469,13 @@ class PlotItem(GraphicsWidget):
def updateGrid(self, *args):
g = self.ctrl.gridGroup.isChecked()
if g:
g = self.ctrl.gridAlphaSlider.value()
for k in self.scales:
self.scales[k]['item'].setGrid(g)
alpha = self.ctrl.gridAlphaSlider.value()
x = alpha if self.ctrl.xGridCheck.isChecked() else False
y = alpha if self.ctrl.xGridCheck.isChecked() else False
self.getAxis('top').setGrid(x)
self.getAxis('bottom').setGrid(x)
self.getAxis('left').setGrid(y)
self.getAxis('right').setGrid(y)
def viewGeometry(self):
"""Return the screen geometry of the viewbox"""
@ -754,7 +793,8 @@ class PlotItem(GraphicsWidget):
## configure curve for this plot
(alpha, auto) = self.alphaState()
item.setAlpha(alpha, auto)
item.setFftMode(self.ctrl.powerSpectrumGroup.isChecked())
item.setFftMode(self.ctrl.fftCheck.isChecked())
item.setLogMode(self.ctrl.logXCheck.isChecked(), self.ctrl.logYCheck.isChecked())
item.setDownsampling(self.downsampleMode())
item.setPointMode(self.pointMode())
@ -864,7 +904,18 @@ class PlotItem(GraphicsWidget):
return item
def scatterPlot(self, *args, **kargs):
print "PlotItem.scatterPlot is deprecated. Use PlotItem.plot instead."
if 'pen' in kargs:
kargs['symbolPen'] = kargs['pen']
kargs['pen'] = None
if 'brush' in kargs:
kargs['symbolBrush'] = kargs['brush']
del kargs['brush']
if 'size' in kargs:
kargs['symbolSize'] = kargs['size']
del kargs['size']
return self.plot(*args, **kargs)
#sp = ScatterPlotItem(*args, **kargs)
#self.addItem(sp)
@ -1155,6 +1206,12 @@ class PlotItem(GraphicsWidget):
self.updateAlpha()
self.updateDecimation()
if 'powerSpectrumGroup' in state:
state['fftCheck'] = state['powerSpectrumGroup']
if 'gridGroup' in state:
state['xGridCheck'] = state['gridGroup']
state['yGridCheck'] = state['gridGroup']
self.stateGroup.setState(state)
#self.updateXScale()
#self.updateYScale()
@ -1183,12 +1240,24 @@ class PlotItem(GraphicsWidget):
def updateSpectrumMode(self, b=None):
if b is None:
b = self.ctrl.powerSpectrumGroup.isChecked()
b = self.ctrl.fftCheck.isChecked()
for c in self.curves:
c.setFftMode(b)
self.enableAutoRange()
self.recomputeAverages()
def updateLogMode(self):
x = self.ctrl.logXCheck.isChecked()
y = self.ctrl.logYCheck.isChecked()
for c in self.curves:
c.setLogMode(x,y)
self.getAxis('bottom').setLogMode(x)
self.getAxis('top').setLogMode(x)
self.getAxis('left').setLogMode(y)
self.getAxis('right').setLogMode(y)
self.enableAutoRange()
self.recomputeAverages()
def updateDownsampling(self):
ds = self.downsampleMode()
@ -1291,8 +1360,13 @@ class PlotItem(GraphicsWidget):
raise Exception("Scale '%s' not found. Scales are: %s" % (key, str(self.scales.keys())))
def getScale(self, key):
self._checkScaleKey(key)
return self.scales[key]['item']
return self.getAxis(key)
def getAxis(self, name):
"""Return the specified AxisItem.
*name* should be 'left', 'bottom', 'top', or 'right'."""
self._checkScaleKey(name)
return self.scales[name]['item']
def setLabel(self, axis, text=None, units=None, unitPrefix=None, **args):
"""

View File

@ -2,8 +2,8 @@
# Form implementation generated from reading ui file 'plotConfigTemplate.ui'
#
# Created: Fri Jan 20 11:24:44 2012
# by: PyQt4 UI code generator 4.8.3
# Created: Sat Apr 21 14:42:02 2012
# by: PyQt4 UI code generator 4.8.5
#
# WARNING! All changes made in this file will be lost!
@ -18,8 +18,11 @@ class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName(_fromUtf8("Form"))
Form.resize(258, 605)
Form.setWindowTitle(QtGui.QApplication.translate("Form", "Form", None, QtGui.QApplication.UnicodeUTF8))
self.averageGroup = QtGui.QGroupBox(Form)
self.averageGroup.setGeometry(QtCore.QRect(10, 200, 242, 182))
self.averageGroup.setToolTip(QtGui.QApplication.translate("Form", "Display averages of the curves displayed in this plot. The parameter list allows you to choose parameters to average over (if any are available).", None, QtGui.QApplication.UnicodeUTF8))
self.averageGroup.setTitle(QtGui.QApplication.translate("Form", "Average", None, QtGui.QApplication.UnicodeUTF8))
self.averageGroup.setCheckable(True)
self.averageGroup.setChecked(False)
self.averageGroup.setObjectName(_fromUtf8("averageGroup"))
@ -31,7 +34,8 @@ class Ui_Form(object):
self.avgParamList.setObjectName(_fromUtf8("avgParamList"))
self.gridLayout_5.addWidget(self.avgParamList, 0, 0, 1, 1)
self.decimateGroup = QtGui.QGroupBox(Form)
self.decimateGroup.setGeometry(QtCore.QRect(0, 30, 242, 160))
self.decimateGroup.setGeometry(QtCore.QRect(0, 70, 242, 160))
self.decimateGroup.setTitle(QtGui.QApplication.translate("Form", "Downsample", None, QtGui.QApplication.UnicodeUTF8))
self.decimateGroup.setCheckable(True)
self.decimateGroup.setObjectName(_fromUtf8("decimateGroup"))
self.gridLayout_4 = QtGui.QGridLayout(self.decimateGroup)
@ -39,69 +43,102 @@ class Ui_Form(object):
self.gridLayout_4.setSpacing(0)
self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4"))
self.manualDecimateRadio = QtGui.QRadioButton(self.decimateGroup)
self.manualDecimateRadio.setText(QtGui.QApplication.translate("Form", "Manual", None, QtGui.QApplication.UnicodeUTF8))
self.manualDecimateRadio.setChecked(True)
self.manualDecimateRadio.setObjectName(_fromUtf8("manualDecimateRadio"))
self.gridLayout_4.addWidget(self.manualDecimateRadio, 0, 0, 1, 1)
self.downsampleSpin = QtGui.QSpinBox(self.decimateGroup)
self.downsampleSpin.setMinimum(1)
self.downsampleSpin.setMaximum(100000)
self.downsampleSpin.setProperty(_fromUtf8("value"), 1)
self.downsampleSpin.setProperty("value", 1)
self.downsampleSpin.setObjectName(_fromUtf8("downsampleSpin"))
self.gridLayout_4.addWidget(self.downsampleSpin, 0, 1, 1, 1)
self.autoDecimateRadio = QtGui.QRadioButton(self.decimateGroup)
self.autoDecimateRadio.setText(QtGui.QApplication.translate("Form", "Auto", None, QtGui.QApplication.UnicodeUTF8))
self.autoDecimateRadio.setChecked(False)
self.autoDecimateRadio.setObjectName(_fromUtf8("autoDecimateRadio"))
self.gridLayout_4.addWidget(self.autoDecimateRadio, 1, 0, 1, 1)
self.maxTracesCheck = QtGui.QCheckBox(self.decimateGroup)
self.maxTracesCheck.setToolTip(QtGui.QApplication.translate("Form", "If multiple curves are displayed in this plot, check this box to limit the number of traces that are displayed.", None, QtGui.QApplication.UnicodeUTF8))
self.maxTracesCheck.setText(QtGui.QApplication.translate("Form", "Max Traces:", None, QtGui.QApplication.UnicodeUTF8))
self.maxTracesCheck.setObjectName(_fromUtf8("maxTracesCheck"))
self.gridLayout_4.addWidget(self.maxTracesCheck, 2, 0, 1, 1)
self.maxTracesSpin = QtGui.QSpinBox(self.decimateGroup)
self.maxTracesSpin.setToolTip(QtGui.QApplication.translate("Form", "If multiple curves are displayed in this plot, check \"Max Traces\" and set this value to limit the number of traces that are displayed.", None, QtGui.QApplication.UnicodeUTF8))
self.maxTracesSpin.setObjectName(_fromUtf8("maxTracesSpin"))
self.gridLayout_4.addWidget(self.maxTracesSpin, 2, 1, 1, 1)
self.forgetTracesCheck = QtGui.QCheckBox(self.decimateGroup)
self.forgetTracesCheck.setToolTip(QtGui.QApplication.translate("Form", "If MaxTraces is checked, remove curves from memory after they are hidden (saves memory, but traces can not be un-hidden).", None, QtGui.QApplication.UnicodeUTF8))
self.forgetTracesCheck.setText(QtGui.QApplication.translate("Form", "Forget hidden traces", None, QtGui.QApplication.UnicodeUTF8))
self.forgetTracesCheck.setObjectName(_fromUtf8("forgetTracesCheck"))
self.gridLayout_4.addWidget(self.forgetTracesCheck, 3, 0, 1, 2)
self.powerSpectrumGroup = QtGui.QGroupBox(Form)
self.powerSpectrumGroup.setGeometry(QtCore.QRect(0, 0, 242, 41))
self.powerSpectrumGroup.setCheckable(True)
self.powerSpectrumGroup.setChecked(False)
self.powerSpectrumGroup.setObjectName(_fromUtf8("powerSpectrumGroup"))
self.transformGroup = QtGui.QFrame(Form)
self.transformGroup.setGeometry(QtCore.QRect(0, 0, 154, 79))
self.transformGroup.setObjectName(_fromUtf8("transformGroup"))
self.gridLayout = QtGui.QGridLayout(self.transformGroup)
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
self.fftCheck = QtGui.QCheckBox(self.transformGroup)
self.fftCheck.setText(QtGui.QApplication.translate("Form", "Power Spectrum (FFT)", None, QtGui.QApplication.UnicodeUTF8))
self.fftCheck.setObjectName(_fromUtf8("fftCheck"))
self.gridLayout.addWidget(self.fftCheck, 0, 0, 1, 1)
self.logXCheck = QtGui.QCheckBox(self.transformGroup)
self.logXCheck.setText(QtGui.QApplication.translate("Form", "Log X", None, QtGui.QApplication.UnicodeUTF8))
self.logXCheck.setObjectName(_fromUtf8("logXCheck"))
self.gridLayout.addWidget(self.logXCheck, 1, 0, 1, 1)
self.logYCheck = QtGui.QCheckBox(self.transformGroup)
self.logYCheck.setText(QtGui.QApplication.translate("Form", "Log Y", None, QtGui.QApplication.UnicodeUTF8))
self.logYCheck.setObjectName(_fromUtf8("logYCheck"))
self.gridLayout.addWidget(self.logYCheck, 2, 0, 1, 1)
self.pointsGroup = QtGui.QGroupBox(Form)
self.pointsGroup.setGeometry(QtCore.QRect(10, 520, 234, 58))
self.pointsGroup.setGeometry(QtCore.QRect(10, 550, 234, 58))
self.pointsGroup.setTitle(QtGui.QApplication.translate("Form", "Points", None, QtGui.QApplication.UnicodeUTF8))
self.pointsGroup.setCheckable(True)
self.pointsGroup.setObjectName(_fromUtf8("pointsGroup"))
self.verticalLayout_5 = QtGui.QVBoxLayout(self.pointsGroup)
self.verticalLayout_5.setObjectName(_fromUtf8("verticalLayout_5"))
self.autoPointsCheck = QtGui.QCheckBox(self.pointsGroup)
self.autoPointsCheck.setText(QtGui.QApplication.translate("Form", "Auto", None, QtGui.QApplication.UnicodeUTF8))
self.autoPointsCheck.setChecked(True)
self.autoPointsCheck.setObjectName(_fromUtf8("autoPointsCheck"))
self.verticalLayout_5.addWidget(self.autoPointsCheck)
self.gridGroup = QtGui.QGroupBox(Form)
self.gridGroup.setGeometry(QtCore.QRect(10, 460, 234, 60))
self.gridGroup.setCheckable(True)
self.gridGroup.setChecked(False)
self.gridGroup = QtGui.QFrame(Form)
self.gridGroup.setGeometry(QtCore.QRect(10, 460, 221, 81))
self.gridGroup.setObjectName(_fromUtf8("gridGroup"))
self.verticalLayout_4 = QtGui.QVBoxLayout(self.gridGroup)
self.verticalLayout_4.setObjectName(_fromUtf8("verticalLayout_4"))
self.gridLayout_2 = QtGui.QGridLayout(self.gridGroup)
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
self.xGridCheck = QtGui.QCheckBox(self.gridGroup)
self.xGridCheck.setText(QtGui.QApplication.translate("Form", "Show X Grid", None, QtGui.QApplication.UnicodeUTF8))
self.xGridCheck.setObjectName(_fromUtf8("xGridCheck"))
self.gridLayout_2.addWidget(self.xGridCheck, 0, 0, 1, 2)
self.yGridCheck = QtGui.QCheckBox(self.gridGroup)
self.yGridCheck.setText(QtGui.QApplication.translate("Form", "Show Y Grid", None, QtGui.QApplication.UnicodeUTF8))
self.yGridCheck.setObjectName(_fromUtf8("yGridCheck"))
self.gridLayout_2.addWidget(self.yGridCheck, 1, 0, 1, 2)
self.gridAlphaSlider = QtGui.QSlider(self.gridGroup)
self.gridAlphaSlider.setMaximum(255)
self.gridAlphaSlider.setProperty(_fromUtf8("value"), 70)
self.gridAlphaSlider.setProperty("value", 70)
self.gridAlphaSlider.setOrientation(QtCore.Qt.Horizontal)
self.gridAlphaSlider.setObjectName(_fromUtf8("gridAlphaSlider"))
self.verticalLayout_4.addWidget(self.gridAlphaSlider)
self.gridLayout_2.addWidget(self.gridAlphaSlider, 2, 1, 1, 1)
self.label = QtGui.QLabel(self.gridGroup)
self.label.setText(QtGui.QApplication.translate("Form", "Opacity", None, QtGui.QApplication.UnicodeUTF8))
self.label.setObjectName(_fromUtf8("label"))
self.gridLayout_2.addWidget(self.label, 2, 0, 1, 1)
self.alphaGroup = QtGui.QGroupBox(Form)
self.alphaGroup.setGeometry(QtCore.QRect(10, 390, 234, 60))
self.alphaGroup.setTitle(QtGui.QApplication.translate("Form", "Alpha", None, QtGui.QApplication.UnicodeUTF8))
self.alphaGroup.setCheckable(True)
self.alphaGroup.setObjectName(_fromUtf8("alphaGroup"))
self.horizontalLayout = QtGui.QHBoxLayout(self.alphaGroup)
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.autoAlphaCheck = QtGui.QCheckBox(self.alphaGroup)
self.autoAlphaCheck.setText(QtGui.QApplication.translate("Form", "Auto", None, QtGui.QApplication.UnicodeUTF8))
self.autoAlphaCheck.setChecked(False)
self.autoAlphaCheck.setObjectName(_fromUtf8("autoAlphaCheck"))
self.horizontalLayout.addWidget(self.autoAlphaCheck)
self.alphaSlider = QtGui.QSlider(self.alphaGroup)
self.alphaSlider.setMaximum(1000)
self.alphaSlider.setProperty(_fromUtf8("value"), 1000)
self.alphaSlider.setProperty("value", 1000)
self.alphaSlider.setOrientation(QtCore.Qt.Horizontal)
self.alphaSlider.setObjectName(_fromUtf8("alphaSlider"))
self.horizontalLayout.addWidget(self.alphaSlider)
@ -110,21 +147,5 @@ class Ui_Form(object):
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
Form.setWindowTitle(QtGui.QApplication.translate("Form", "Form", None, QtGui.QApplication.UnicodeUTF8))
self.averageGroup.setToolTip(QtGui.QApplication.translate("Form", "Display averages of the curves displayed in this plot. The parameter list allows you to choose parameters to average over (if any are available).", None, QtGui.QApplication.UnicodeUTF8))
self.averageGroup.setTitle(QtGui.QApplication.translate("Form", "Average", None, QtGui.QApplication.UnicodeUTF8))
self.decimateGroup.setTitle(QtGui.QApplication.translate("Form", "Downsample", None, QtGui.QApplication.UnicodeUTF8))
self.manualDecimateRadio.setText(QtGui.QApplication.translate("Form", "Manual", None, QtGui.QApplication.UnicodeUTF8))
self.autoDecimateRadio.setText(QtGui.QApplication.translate("Form", "Auto", None, QtGui.QApplication.UnicodeUTF8))
self.maxTracesCheck.setToolTip(QtGui.QApplication.translate("Form", "If multiple curves are displayed in this plot, check this box to limit the number of traces that are displayed.", None, QtGui.QApplication.UnicodeUTF8))
self.maxTracesCheck.setText(QtGui.QApplication.translate("Form", "Max Traces:", None, QtGui.QApplication.UnicodeUTF8))
self.maxTracesSpin.setToolTip(QtGui.QApplication.translate("Form", "If multiple curves are displayed in this plot, check \"Max Traces\" and set this value to limit the number of traces that are displayed.", None, QtGui.QApplication.UnicodeUTF8))
self.forgetTracesCheck.setToolTip(QtGui.QApplication.translate("Form", "If MaxTraces is checked, remove curves from memory after they are hidden (saves memory, but traces can not be un-hidden).", None, QtGui.QApplication.UnicodeUTF8))
self.forgetTracesCheck.setText(QtGui.QApplication.translate("Form", "Forget hidden traces", None, QtGui.QApplication.UnicodeUTF8))
self.powerSpectrumGroup.setTitle(QtGui.QApplication.translate("Form", "Power Spectrum", None, QtGui.QApplication.UnicodeUTF8))
self.pointsGroup.setTitle(QtGui.QApplication.translate("Form", "Points", None, QtGui.QApplication.UnicodeUTF8))
self.autoPointsCheck.setText(QtGui.QApplication.translate("Form", "Auto", None, QtGui.QApplication.UnicodeUTF8))
self.gridGroup.setTitle(QtGui.QApplication.translate("Form", "Grid", None, QtGui.QApplication.UnicodeUTF8))
self.alphaGroup.setTitle(QtGui.QApplication.translate("Form", "Alpha", None, QtGui.QApplication.UnicodeUTF8))
self.autoAlphaCheck.setText(QtGui.QApplication.translate("Form", "Auto", None, QtGui.QApplication.UnicodeUTF8))
pass

View File

@ -50,7 +50,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>30</y>
<y>70</y>
<width>242</width>
<height>160</height>
</rect>
@ -130,30 +130,44 @@
</item>
</layout>
</widget>
<widget class="QGroupBox" name="powerSpectrumGroup">
<widget class="QFrame" name="transformGroup">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>242</width>
<height>41</height>
<width>154</width>
<height>79</height>
</rect>
</property>
<property name="title">
<string>Power Spectrum</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QCheckBox" name="fftCheck">
<property name="text">
<string>Power Spectrum (FFT)</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="logXCheck">
<property name="text">
<string>Log X</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="logYCheck">
<property name="text">
<string>Log Y</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QGroupBox" name="pointsGroup">
<property name="geometry">
<rect>
<x>10</x>
<y>520</y>
<y>550</y>
<width>234</width>
<height>58</height>
</rect>
@ -177,26 +191,31 @@
</item>
</layout>
</widget>
<widget class="QGroupBox" name="gridGroup">
<widget class="QFrame" name="gridGroup">
<property name="geometry">
<rect>
<x>10</x>
<y>460</y>
<width>234</width>
<height>60</height>
<width>221</width>
<height>81</height>
</rect>
</property>
<property name="title">
<string>Grid</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="xGridCheck">
<property name="text">
<string>Show X Grid</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="yGridCheck">
<property name="text">
<string>Show Y Grid</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSlider" name="gridAlphaSlider">
<property name="maximum">
<number>255</number>
@ -209,6 +228,13 @@
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Opacity</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QGroupBox" name="alphaGroup">