Skip to content
Advertisement

(Python) tkinter figures (with colorbar) overlap when using slider

The following codes is to plot contours from five (slider: 0 ~ 4) .xlsx files on tkinter. Each file just contains numerical data in the matrix 12X6 such as

enter image description here

JavaScript

When running it, I got

enter image description here

Now, if I use fig.clf, for example

JavaScript

I got

enter image description here

The contour disappeared. I also tried from matplotlib.figure import Figure instead of pyplot; however, it does not work.

How to fix this odd problem?

Any advices please, thanks!

Advertisement

Answer

Refactored code into a class and added feature to select folder. Other ideas are in the comments.

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement