Skip to content
Advertisement

Tag: tkinter

How to update a plot in matplotlib

I’m having issues with redrawing the figure here. I allow the user to specify the units in the time scale (x-axis) and then I recalculate and call this function plots(). I want the plot to simply update, not append another plot to the figure. Answer You essentially have two options: Do exactly what you’re currently doing, but call graph1.clear() and

How do I make Python remember settings?

I wrote the beautiful python example code below. Now how do I make it so when I exit then restart the program it remembers the last position of the scale? Edit: I tried the following code But get the following error Answer Write the scale value to a file and read it in on startup. Here’s one way to do

ttk.Button returns None [duplicate]

This question already has answers here: Tkinter: AttributeError: NoneType object has no attribute <attribute name> (4 answers) Closed 8 months ago. I am trying to use the invoke method of a ttk.Button, as shown at TkDocs (look at “The Command Callback”), but I keep getting this error: AttributeError: ‘NoneType’ object has no attribute ‘invoke’ So, I tried this in the

How to make a Tkinter window jump to the front?

How do I get a Tkinter application to jump to the front? Currently, the window appears behind all my other windows and doesn’t get focus. Is there some method I should be calling? Answer Assuming you mean your application windows when you say “my other windows”, you can use the lift() method on a Toplevel or Tk: If you want

Advertisement