How to continually open a matplotlib plot in the same location?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to continually open a matplotlib plot in the same location?

MacItaly

 

How to continually open a matplotlib plot in the same location?

I've looked here and here trying to figure out how to make my matplotlib plot open in the same window location EVERY TIME. I'm using TkAgg for my backend, and using the code below I can only get the FIRST plot to open in the set location. When the program loops back and runs this part again, then the plot opens in a different location. I'm using Windows 10, Python 3.7.7 64-bit through Visual Studio Code.

 

fig = plt.figure(5)

figManager = plt.get_current_fig_manager()

figManager.window.wm_geometry("1000x600+0+0")

 


_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: How to continually open a matplotlib plot in the same location?

MacItaly

I did a quick screen capture so you can see how the graph opens in a new location

https://imgur.com/gallery/mfT8FqQ

 

 

From: Matplotlib-users <matplotlib-users-bounces+abillings=[hidden email]> On Behalf Of Anthony Billings
Sent: Friday, February 26, 2021 9:59 AM
To: [hidden email]
Subject: [Matplotlib-users] How to continually open a matplotlib plot in the same location?

 

 

How to continually open a matplotlib plot in the same location?

I've looked here and here trying to figure out how to make my matplotlib plot open in the same window location EVERY TIME. I'm using TkAgg for my backend, and using the code below I can only get the FIRST plot to open in the set location. When the program loops back and runs this part again, then the plot opens in a different location. I'm using Windows 10, Python 3.7.7 64-bit through Visual Studio Code.

 

fig = plt.figure(5)

figManager = plt.get_current_fig_manager()

figManager.window.wm_geometry("1000x600+0+0")

 


_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: How to continually open a matplotlib plot in the same location?

MacItaly
In reply to this post by MacItaly

I figured it out. It was the interactive plot plt.ion() and it was screwing things up!


_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users