Matplotlib plots behaviour

hi, first post here…

i am trying sample application… noticed this behaviour…


in the notebook panel i placed a button to draw a plot. but as you can see it does not show immediately…
i have to resize the panel/window for it to show…

i tried with different plots but same thing everytime…

matplot canvas is placed on box sizer on third panel, which is inside of notebook in split window fashion…

i needed the plot to show immd. when i clicked the buttton.
can you help me… ?


Please can you post a simple, complete program that demonstrates this problem.

Also let us know what versions of python and wxpython you are using and what OS you are running on, thanks.

Yes, a fully working example is the best way to fix such problems.

You probably forgot the final call to canvas.draw(). Calling only plot() will not trigger an update.
See here for some working examples:


yupp… simply adding canvas.draw() in draw binded function makes them appear instantly…TY.

OS = win.1
python 3.9
wx 4.1.1