Using a tuple to designate a single colour in a plot command, like this:
plot(range(10), c=(0.5, 0.5, 0.5))
and then clicking on the "Edit curves line and axes parameter" button raises this TypeError:
Traceback (most recent call last):
File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/backend_qt4.py", line 577, in edit_parameters
figureoptions.figure_edit(axes, self)
File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/qt4_editor/figureoptions.py", line 134, in figure_edit
icon=get_icon('qt4_editor_options.svg'), apply=apply_callback)
File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/qt4_editor/formlayout.py", line 514, in fedit
dialog = FormDialog(data, title, comment, icon, parent, apply)
File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/qt4_editor/formlayout.py", line 431, in __init__
self.formwidget.setup()
File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/qt4_editor/formlayout.py", line 403, in setup
widget.setup()
File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/qt4_editor/formlayout.py", line 378, in setup
widget.setup()
File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/qt4_editor/formlayout.py", line 285, in setup
field.addItems(value)
TypeError: QComboBox.addItems(QStringList): argument 1 has unexpected type 'list'
Traceback (most recent call last):
File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/backend_qt4.py", line 577, in edit_parameters
figureoptions.figure_edit(axes, self)
File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/qt4_editor/figureoptions.py", line 134, in figure_edit
icon=get_icon('qt4_editor_options.svg'), apply=apply_callback)
File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/qt4_editor/formlayout.py", line 514, in fedit
dialog = FormDialog(data, title, comment, icon, parent, apply)
File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/qt4_editor/formlayout.py", line 431, in __init__
self.formwidget.setup()
File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/qt4_editor/formlayout.py", line 403, in setup
widget.setup()
File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/qt4_editor/formlayout.py", line 378, in setup
widget.setup()
File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/qt4_editor/formlayout.py", line 285, in setup
field.addItems(value)
TypeError: QComboBox.addItems(QStringList): argument 1 has unexpected type 'list'
Thanks! That fixed the TypeError in both cases in the first post. But when I do this:
plot(range(10), c=(0.5, 0.5, 0.5))
and then click on the "Edit curves line and axes parameter" button, the line and marker colours show up as my default black instead of grey, so the dialog isn't being updated properly. Hitting Apply or OK changes them to black, without me actually changing anything in the dialog. Not a big deal though.
Activity
mspacek commented on Jan 25, 2013
I just discovered that this:
plot(range(10), range(10), 'k', marker='o', ms=3)
also raises the exact same traceback and error:
Traceback (most recent call last): File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/backend_qt4.py", line 577, in edit_parameters figureoptions.figure_edit(axes, self) File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/qt4_editor/figureoptions.py", line 134, in figure_edit icon=get_icon('qt4_editor_options.svg'), apply=apply_callback) File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/qt4_editor/formlayout.py", line 514, in fedit dialog = FormDialog(data, title, comment, icon, parent, apply) File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/qt4_editor/formlayout.py", line 431, in __init__ self.formwidget.setup() File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/qt4_editor/formlayout.py", line 403, in setup widget.setup() File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/qt4_editor/formlayout.py", line 378, in setup widget.setup() File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/qt4_editor/formlayout.py", line 285, in setup field.addItems(value) TypeError: QComboBox.addItems(QStringList): argument 1 has unexpected type 'list'mspacek commented on Jan 25, 2013
However, if I use
plot(range(10), range(10), 'k-o', ms=3)
instead, I get the exact same plot, and no error when I click on the "edit curve line and axes parameters button"
efiring commented on Jan 28, 2013
Confirmed with v1.2.x. I think this limitation has always been present.
Merge pull request #2017 from drevicko/fix-form-colors
mdboom commented on May 24, 2013
Closed by #2017.
mspacek commented on May 24, 2013
Thanks! That fixed the TypeError in both cases in the first post. But when I do this:
and then click on the "Edit curves line and axes parameter" button, the line and marker colours show up as my default black instead of grey, so the dialog isn't being updated properly. Hitting Apply or OK changes them to black, without me actually changing anything in the dialog. Not a big deal though.