Relative Content

Tag Archive for pythonmatplotlibtkinter

Mathplotlib FuncAnimate in tkinter Window

I have a Question concerning putting a Mathplotlib Animation in a Tkinter window. I have found a few answers, but they all seem to be using much more difficult plots.

Vertically scroll multiple plots in Tkinter

I would like to draw multiple plots with Matplotlib, add them to a Tkinter frame (stack them one below the other), and be able to scroll vertically between the plots.
Each plot shold fill the x-direction, and have a minimum y-height, so that if the total height of the multiple plots is above the height of the window, the scroll should be enabled.

Vertically scroll multiple plots in Tkinter

I would like to draw multiple plots with Matplotlib, add them to a Tkinter frame (stack them one below the other), and be able to scroll vertically between the plots.
Each plot shold fill the x-direction, and have a minimum y-height, so that if the total height of the multiple plots is above the height of the window, the scroll should be enabled.

Matplotlib freezing for no reason. What am I doing wrong

I am trying to plot interactive matplotlib figure in Tkinter. I took the slider_demo https://matplotlib.org/stable/gallery/widgets/slider_demo.html and tried to encapsulate it in FigureCanvasTkAgg. The code run correctly but if I move the sliders several times (alternating the two) the program freeze???
To try to understand the problem I took the original demo and did the following changes: all the code to plot has been encapsulated in a function plot_sin() and in main I just call this function and do a plt.show(). I have the same problem as explained before. Therefore the problem does not seems to be related to embedding the plot in tkinter but something else that I do not understand.
May be someone can tell me what I did wrong

Canvas frame is small inside the tkinter frame

I tried to create a frame inside the frame i want place the canvas and inside the canvas one more frame. And inside the frame i want to keep actual canvas and enabled the horizontal scroll. As followed from earlier tread Scrollbar in tkinter is not working with canvas. Canvas block is really small.
`

How do I make tkinter not block jupyter like matplotlib does?

I have matplotlib-based GUI app which takes inputs and plots graphs. It works just fine except that the UI is abysmally non-responsive (seconds before it reacts to mouse clicks or keyboard, on a fairly powerful windows box). I start it from jupyter notebook with %matplotlib qt, the GUI shows up, and the notebook is not blocked, so I can query and modify the underlying matplotlib objects interactively.

Matplotlib button not responding

I want to add a button that will allow the user to toggle one of four plots between two different data sets, however, the button fails to respond.