Graph window resized incorrectly with macOS+matplotlib+wxPython
Asked 3 months ago, Updated 3 months ago, 8 views
Using Python 3.8.1, Matplotlib 3.2.1, and wxPython 4.0.7 post2 installed on macOS Catalina (10.15.4), the code below draws four graphs, but if you resize the window, the initial image remains and the enlarged image is not displayed.
Windows will redraw without any problems. How can I modify the code to make it look good on macOS?
The symptoms may be different, but Windows also experienced a situation where the drawing was disrupted once it was reduced and then enlarged.
64-bit Python 3.8.2, Matplotlib 3.2.1, and wxPython 4.0.7 post2 environment on Windows 10.
So when I looked at the sample below of matplotlib, the setting order of the main graph area and the setting order of the toolbar area were reversed, so I changed it accordingly and it started to work well. user_interfaces example code:embedding_in_wx2.py
The source of the application is as follows.I have included comments in the changes.
See what happens with macOS.