Skip to content

Commit 476e02b

Browse files
committed
Change layout engine and reset all axes
Prep. for new DistributionPlot The new DistributionPlot will use multiple axis, so need to be able to reset all axes at reset(). Otherwise will get log-scale error when un-checking the log-scale checkbox.
1 parent 6f282fc commit 476e02b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/ert/gui/plotting/widgets/plot_widget.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ def __init__(
151151
self.resetPlot()
152152

153153
def resetPlot(self) -> None:
154+
# Some figures contain twinaxes
155+
# Resetting the xscale to linear for all axes
156+
# to avoid log scale issues when re-plotting after a log scale plot
157+
for ax in self._figure.axes:
158+
ax.set_xscale("linear")
154159
self._figure.clear()
155160

156161
@property

0 commit comments

Comments
 (0)