Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7a80933

Browse files
committed
Merge pull request #6281 from tacaswell/fix_qt_setscales
FIX: do not always reset scales from figureoptions
2 parents afee9c8 + fd799a8 commit 7a80933

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/matplotlib/backends/qt_editor/figureoptions.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,12 @@ def apply_callback(data):
120120
# Set / General
121121
title, xmin, xmax, xlabel, xscale, ymin, ymax, ylabel, yscale, \
122122
generate_legend = general
123-
axes.set_xscale(xscale)
124-
axes.set_yscale(yscale)
123+
124+
if axes.get_xscale() != xscale:
125+
axes.set_xscale(xscale)
126+
if axes.get_yscale() != yscale:
127+
axes.set_yscale(yscale)
128+
125129
axes.set_title(title)
126130
axes.set_xlim(xmin, xmax)
127131
axes.set_xlabel(xlabel)

0 commit comments

Comments
 (0)