Qt backend figureoptions.py does not work due to change in image.py #9332
Clicking on the figure options button (only available in the Qt backend) when showing an image does not work anymore. The dialog does not open and the script throws a TypeError.
Code for reproduction
from matplotlib import use use('Qt5Agg') import numpy as np import matplotlib.pyplot as plt data = np.ones((10,10)) plt.figure() plt.imshow(data) plt.show()
Click on figure options button (the second one from the right).
Figure options dialog is not shown, instead a TypeError is thrown:
Figure options dialog is opened and the script does not throw the TypeError. Used to work in matplot 2.0.2.
Bug introduced in matplotlib 2.1.0, specifcally this commit:
changes 'iterpnames' from a variable (which is iterable) into a function (which must be called). The callside (figureoptions.py) was not modified accordingly. I guess adding '()' after iterpnames in figureoptions.py line 168 fixes the problem (untested).