Skip to content

WX Phoenix AttributeError: 'NavigationToolbar2WxAgg' issue #4460

Closed
@jenshnielsen

Description

@jenshnielsen

Trying to test the new WX Phonix backend under Python3 I get the following error:

Traceback (most recent call last):
  File "testwx.py", line 4, in <module>
    plt.plot(range(100))
  File "/usr/local/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-macosx-10.10-x86_64.egg/matplotlib/pyplot.py", line 3095, in plot
    ax = gca()
  File "/usr/local/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-macosx-10.10-x86_64.egg/matplotlib/pyplot.py", line 830, in gca
    ax =  gcf().gca(**kwargs)
  File "/usr/local/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-macosx-10.10-x86_64.egg/matplotlib/pyplot.py", line 463, in gcf
    return figure()
  File "/usr/local/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-macosx-10.10-x86_64.egg/matplotlib/pyplot.py", line 436, in figure
    **kwargs)
  File "/usr/local/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-macosx-10.10-x86_64.egg/matplotlib/backends/backend_wxagg.py", line 113, in new_figure_manager
    return new_figure_manager_given_figure(num, fig)
  File "/usr/local/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-macosx-10.10-x86_64.egg/matplotlib/backends/backend_wxagg.py", line 120, in new_figure_manager_given_figure
    frame = FigureFrameWxAgg(num, figure)
  File "/usr/local/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-macosx-10.10-x86_64.egg/matplotlib/backends/backend_wx.py", line 1274, in __init__
    tw, th = self.toolbar.GetSizeTuple()
AttributeError: 'NavigationToolbar2WxAgg' object has no attribute 'GetSizeTuple'

From my limited debugging it seems like GetSizeTuple is no more and we should use GetSize and unpack it manually.

Im using wxPython-Phoenix (3.0.3.dev1820+49a8884) on python 3.4.3 (Homebrew OSX 10.10)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions