waveform: remove vertical grids

This commit is contained in:
Simon Renblad 2024-02-19 10:53:27 +08:00 committed by Sébastien Bourdeauducq
parent 1b0fd2e2d3
commit f460af3a6a

View File

@ -242,6 +242,7 @@ class _BaseWaveform(pg.PlotWidget):
class BitWaveform(_BaseWaveform): class BitWaveform(_BaseWaveform):
def __init__(self, name, width, ndecimals, parent=None): def __init__(self, name, width, ndecimals, parent=None):
_BaseWaveform.__init__(self, name, width, ndecimals, parent) _BaseWaveform.__init__(self, name, width, ndecimals, parent)
self.plot_item.showGrid(x=True, y=False)
self._arrows = [] self._arrows = []
def onDataChange(self, data): def onDataChange(self, data):
@ -317,6 +318,7 @@ class BitVectorWaveform(_BaseWaveform):
self._labels = [] self._labels = []
self._format_string = "{:0=" + str(math.ceil(width / 4)) + "X}" self._format_string = "{:0=" + str(math.ceil(width / 4)) + "X}"
self.view_box.sigTransformChanged.connect(self._update_labels) self.view_box.sigTransformChanged.connect(self._update_labels)
self.plot_item.showGrid(x=True, y=False)
def _update_labels(self): def _update_labels(self):
for label in self._labels: for label in self._labels:
@ -375,6 +377,7 @@ class LogWaveform(_BaseWaveform):
self.plot_data_item.opts['pen'] = None self.plot_data_item.opts['pen'] = None
self.plot_data_item.opts['symbol'] = 'x' self.plot_data_item.opts['symbol'] = 'x'
self._labels = [] self._labels = []
self.plot_item.showGrid(x=True, y=False)
def onDataChange(self, data): def onDataChange(self, data):
try: try: