It really looks like a bug in the Qt4 form editor for matplotlib.
The error is within the section of the FormWidget.setup() method in matplotlib/backends/qt4_editor/formwidget.py . In matplotlib 1.1.0 on Windows (where I could not reproduce the problem) it contains the following:
elif isinstance(value, (list, tuple)): selindex = value.pop(0) field = QComboBox(self) if isinstance(value[0], (list, tuple)): keys = [ key for key, _val in value ] value = [ val for _key, val in value ] else: keys = value field.addItems(value)
matplotlib v1.1.1rc on Kubuntu Precise (where I could reproduce the problem) replaces the second line above
selindex = list(value).pop(0)
Ultimately, none of the versions are correct.
The problem with version 1.1.0 method is that it does not process tuples (tuples are immutable and have no pop ) method, and the problem with version 1.1.1rc code is that the first value element must be removed, but it is only removed from the temporary list generated by list(value) .
This bug is fixed in version 1.1.1. I just downloaded and installed this version and can no longer reproduce the problem.
source share