Replies: 1 comment 5 replies
-
I can recreate the bug that only the first panel is used when calling a python script (albeit this does not happen when running this code in a jupyter notebook). I do not see the exception you've seen, but this might have to do with the chosen backend. I opened an Issue to fix the original problem, which might also remove the exception. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Dear authors,
while execution of the example 'analyze_scalar_field.py' I met that from 4 subplots only [0,0] shows the expected information, but other 3 are empty. The following traceback info emerges
[for short: path ---> ...\AppData\Local\Programs\Python\Python39\lib\site-packages]]
Traceback (most recent call last):
File "...\analyze_scalar_field.py", line 26, in
smoothed.plot(ax=axes[1, 0], title="Smoothed field")
File "path\pde\tools\plotting.py", line 287, in wrapper
reference = wrapped(*args, ax=ax, **kwargs)
File "path\pde\fields\base.py", line 1907, in plot
reference = self._plot_image(**kwargs)
File "path\pde\fields\base.py", line 1727, in _plot_image
add_scaled_colorbar(axes_image, ax=ax)
File "path\pde\tools\plotting.py", line 95, in add_scaled_colorbar
cax = divider.append_axes("right", size=width, pad=pad)
File "path\mpl_toolkits\axes_grid1\axes_divider.py", line 551, in append_axes
self._fig.add_axes(ax)
File "path\matplotlib\figure.py", line 653, in add_axes
return self._add_axes_internal(a, key)
File "path\matplotlib\figure.py", line 789, in _add_axes_internal
self.sca(ax)
File "path\matplotlib\figure.py", line 1496, in sca
self.axobservers.process("axes_change_event", self)
File "path\matplotlib\cbook_init.py", line 275, in process
self.exception_handler(exc)
File "path\matplotlib\cbook_init.py", line 89, in exception_printer
raise exc
File "path\matplotlib\cbook_init.py", line 270, in process
func(*args, **kwargs)
File "path\matplotlib\figure.py", line 2861, in
self._axobservers.connect("axes_change_event", lambda arg: func(arg))
File "path\matplotlib\backend_bases.py", line 2765, in notify_axes_change
self.toolbar.update()
File "path\matplotlib\backend_bases.py", line 3330, in update
self.set_history_buttons()
File "path\matplotlib\backends_backend_tk.py", line 666, in set_history_buttons
self.buttons['Back']['state'] = state_map[can_back]
File "...\AppData\Local\Programs\Python\Python39\lib\tkinter_init.py", line 1657, in setitem
self.configure({key: value})
File "...\AppData\Local\Programs\Python\Python39\lib\tkinter_init.py", line 1646, in configure
return self.configure('configure', cnf, kw)
File "...\AppData\Local\Programs\Python\Python39\lib\tkinter_init.py", line 1636, in _configure
self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
_tkinter.TclError: invalid command name ".!navigationtoolbar2tk.!button2"
How to overcome this issue ? Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions