Fix bottom axis when no fsps/subplots
parent
fb39da19f4
commit
2393965e83
|
@ -453,13 +453,6 @@ class LinkedSplits(QWidget):
|
||||||
# add crosshair graphic
|
# add crosshair graphic
|
||||||
self.chart.addItem(self.cursor)
|
self.chart.addItem(self.cursor)
|
||||||
|
|
||||||
# axis placement
|
|
||||||
if (
|
|
||||||
_xaxis_at == 'bottom' and
|
|
||||||
'bottom' in self.chart.plotItem.axes
|
|
||||||
):
|
|
||||||
self.chart.hideAxis('bottom')
|
|
||||||
|
|
||||||
# style?
|
# style?
|
||||||
self.chart.setFrameStyle(
|
self.chart.setFrameStyle(
|
||||||
QFrame.StyledPanel |
|
QFrame.StyledPanel |
|
||||||
|
@ -524,21 +517,26 @@ class LinkedSplits(QWidget):
|
||||||
cpw.hideAxis('left')
|
cpw.hideAxis('left')
|
||||||
cpw.hideAxis('bottom')
|
cpw.hideAxis('bottom')
|
||||||
|
|
||||||
if self.xaxis_chart:
|
if (
|
||||||
self.xaxis_chart.hideAxis('bottom')
|
_xaxis_at == 'bottom' and (
|
||||||
|
self.xaxis_chart
|
||||||
|
or (
|
||||||
|
not self.subplots
|
||||||
|
and self.xaxis_chart is None
|
||||||
|
)
|
||||||
|
)
|
||||||
|
):
|
||||||
|
if self.xaxis_chart:
|
||||||
|
self.xaxis_chart.hideAxis('bottom')
|
||||||
|
|
||||||
# presuming we only want it at the true bottom of all charts.
|
# presuming we only want it at the true bottom of all charts.
|
||||||
# XXX: uses new api from our ``pyqtgraph`` fork.
|
# XXX: uses new api from our ``pyqtgraph`` fork.
|
||||||
# https://github.com/pikers/pyqtgraph/tree/plotitemoverlay_onto_pg_master
|
# https://github.com/pikers/pyqtgraph/tree/plotitemoverlay_onto_pg_master
|
||||||
# _ = self.xaxis_chart.removeAxis('bottom', unlink=False)
|
# _ = self.xaxis_chart.removeAxis('bottom', unlink=False)
|
||||||
# assert 'bottom' not in self.xaxis_chart.plotItem.axes
|
# assert 'bottom' not in self.xaxis_chart.plotItem.axes
|
||||||
|
|
||||||
self.xaxis_chart = cpw
|
self.xaxis_chart = cpw
|
||||||
cpw.showAxis('bottom')
|
cpw.showAxis('bottom')
|
||||||
|
|
||||||
if self.xaxis_chart is None:
|
|
||||||
self.xaxis_chart = cpw
|
|
||||||
|
|
||||||
qframe.chart = cpw
|
qframe.chart = cpw
|
||||||
qframe.hbox.addWidget(cpw)
|
qframe.hbox.addWidget(cpw)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue