Including matplotlib figure() messes up Tkinter Checkbuttons()How do you change the size of figures drawn with matplotlib?Save plot to image file instead of displaying it using Matplotlibimport matplotlib.pyplot hangsHow to make IPython notebook matplotlib plot inlinePycharm error while importing matplotlib.pyplot as pltImport matplotlib.pyplot in python 2.7updating matplotlib to version 1.5 error on windows/enthoughtPython matplotlib installation issueTkInter Frame doesn't load if another function is calledRunning python on A2 hosting - issue with matplotlib and tkinter

What are good ways to spray paint a QR code on a footpath?

Is there a way to print with ABS without enclosure?

Why do I need two parameters in an HTTP parameter pollution attack?

Details of video memory access arbitration in Space Invaders

One folder having two different locations on Ubuntu 18.04

The Confused Alien

Is it okay to fade a human face just to create some space to place important content over it?

What is "oversubscription" in Networking?

Why would anyone even use a Portkey?

Meaning of じゃないんじゃない?

Matrix decomposition

What does the phrase "building hopping chop" mean here?

How can I specify a local port when establishing SSH connections?

Does the app detect walking (and unlock Portmanteaus) if screen lock is on?

Why do we use a cylinder as a Gaussian surface for infinitely long charged wire?

Why do changes to /etc/hosts take effect immediately?

Different budgets within roommate group

How exactly is a normal force exerted, at the molecular level?

Procedurally generate regions on island

My colleague is constantly blaming me for his errors

What game is this character in the Pixels movie from?

Are these intended activities legal to do in the USA under the VWP?

How hard is it to sell a home which is currently mortgaged?

How did researchers find articles before the Internet and the computer era?



Including matplotlib figure() messes up Tkinter Checkbuttons()


How do you change the size of figures drawn with matplotlib?Save plot to image file instead of displaying it using Matplotlibimport matplotlib.pyplot hangsHow to make IPython notebook matplotlib plot inlinePycharm error while importing matplotlib.pyplot as pltImport matplotlib.pyplot in python 2.7updating matplotlib to version 1.5 error on windows/enthoughtPython matplotlib installation issueTkInter Frame doesn't load if another function is calledRunning python on A2 hosting - issue with matplotlib and tkinter






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I'm writing a Tkinter gui, also using matplotlib figures. Since I switched from a Canopy Python 2.7 distribution to a manual installed Python 2.7 installation I encounter wired problems with Tkinter checkbuttons. One can use the buttons but the variable is not set. The problem only appears when I include a matplotlib figure (see example code, 1st lin in main()).



Win7-64



Working installation:
Enthought Canopy 1.7.4.3348,
Python 2.7.11,
matplotlib 2.0.0-8



Now (not working):
Python 2.7.16,
matplotlib 2.2.4



import Tkinter as tk
import ttk as ttk
import matplotlib.pyplot as plt

class Application(tk.Frame):
def __init__(self, gui_master):
tk.Frame.__init__(self, gui_master)
self.gui_master = gui_master
self.frame = tk.Frame(self.gui_master)
self.frame.grid()
self.var = tk.IntVar()
check_STD = ttk.Checkbutton(self.frame, variable= self.var, command = self.check_select)
check_STD.grid(row = 1, column = 1)

def check_select(self):
print 'var', self.var, self.var.get()

def main():
rp_fig, rp_ax = plt.subplots(1, 1, figsize = (9,9))
gui_root = tk.Tk()
gui_root.title("FXD-CSD-GUI")
app = Application(gui_master=gui_root)
gui_root.mainloop()
plt.show()

main()









share|improve this question






















  • using rp_fig = plt.Figure(figsize=(9, 9)) rp_ax = rp_fig.add_subplot(111) it works but I don't get why...

    – user151731
    Mar 25 at 14:46












  • plt.show() blocks the excution of any further code. When using matplotlib.figure.Figure() instead of plt.figure() you are not using pyplot, hence plt.show() has no figure to show and hence will not block.

    – ImportanceOfBeingErnest
    Mar 25 at 16:00

















0















I'm writing a Tkinter gui, also using matplotlib figures. Since I switched from a Canopy Python 2.7 distribution to a manual installed Python 2.7 installation I encounter wired problems with Tkinter checkbuttons. One can use the buttons but the variable is not set. The problem only appears when I include a matplotlib figure (see example code, 1st lin in main()).



Win7-64



Working installation:
Enthought Canopy 1.7.4.3348,
Python 2.7.11,
matplotlib 2.0.0-8



Now (not working):
Python 2.7.16,
matplotlib 2.2.4



import Tkinter as tk
import ttk as ttk
import matplotlib.pyplot as plt

class Application(tk.Frame):
def __init__(self, gui_master):
tk.Frame.__init__(self, gui_master)
self.gui_master = gui_master
self.frame = tk.Frame(self.gui_master)
self.frame.grid()
self.var = tk.IntVar()
check_STD = ttk.Checkbutton(self.frame, variable= self.var, command = self.check_select)
check_STD.grid(row = 1, column = 1)

def check_select(self):
print 'var', self.var, self.var.get()

def main():
rp_fig, rp_ax = plt.subplots(1, 1, figsize = (9,9))
gui_root = tk.Tk()
gui_root.title("FXD-CSD-GUI")
app = Application(gui_master=gui_root)
gui_root.mainloop()
plt.show()

main()









share|improve this question






















  • using rp_fig = plt.Figure(figsize=(9, 9)) rp_ax = rp_fig.add_subplot(111) it works but I don't get why...

    – user151731
    Mar 25 at 14:46












  • plt.show() blocks the excution of any further code. When using matplotlib.figure.Figure() instead of plt.figure() you are not using pyplot, hence plt.show() has no figure to show and hence will not block.

    – ImportanceOfBeingErnest
    Mar 25 at 16:00













0












0








0








I'm writing a Tkinter gui, also using matplotlib figures. Since I switched from a Canopy Python 2.7 distribution to a manual installed Python 2.7 installation I encounter wired problems with Tkinter checkbuttons. One can use the buttons but the variable is not set. The problem only appears when I include a matplotlib figure (see example code, 1st lin in main()).



Win7-64



Working installation:
Enthought Canopy 1.7.4.3348,
Python 2.7.11,
matplotlib 2.0.0-8



Now (not working):
Python 2.7.16,
matplotlib 2.2.4



import Tkinter as tk
import ttk as ttk
import matplotlib.pyplot as plt

class Application(tk.Frame):
def __init__(self, gui_master):
tk.Frame.__init__(self, gui_master)
self.gui_master = gui_master
self.frame = tk.Frame(self.gui_master)
self.frame.grid()
self.var = tk.IntVar()
check_STD = ttk.Checkbutton(self.frame, variable= self.var, command = self.check_select)
check_STD.grid(row = 1, column = 1)

def check_select(self):
print 'var', self.var, self.var.get()

def main():
rp_fig, rp_ax = plt.subplots(1, 1, figsize = (9,9))
gui_root = tk.Tk()
gui_root.title("FXD-CSD-GUI")
app = Application(gui_master=gui_root)
gui_root.mainloop()
plt.show()

main()









share|improve this question














I'm writing a Tkinter gui, also using matplotlib figures. Since I switched from a Canopy Python 2.7 distribution to a manual installed Python 2.7 installation I encounter wired problems with Tkinter checkbuttons. One can use the buttons but the variable is not set. The problem only appears when I include a matplotlib figure (see example code, 1st lin in main()).



Win7-64



Working installation:
Enthought Canopy 1.7.4.3348,
Python 2.7.11,
matplotlib 2.0.0-8



Now (not working):
Python 2.7.16,
matplotlib 2.2.4



import Tkinter as tk
import ttk as ttk
import matplotlib.pyplot as plt

class Application(tk.Frame):
def __init__(self, gui_master):
tk.Frame.__init__(self, gui_master)
self.gui_master = gui_master
self.frame = tk.Frame(self.gui_master)
self.frame.grid()
self.var = tk.IntVar()
check_STD = ttk.Checkbutton(self.frame, variable= self.var, command = self.check_select)
check_STD.grid(row = 1, column = 1)

def check_select(self):
print 'var', self.var, self.var.get()

def main():
rp_fig, rp_ax = plt.subplots(1, 1, figsize = (9,9))
gui_root = tk.Tk()
gui_root.title("FXD-CSD-GUI")
app = Application(gui_master=gui_root)
gui_root.mainloop()
plt.show()

main()






python python-2.7 matplotlib tkinter






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 25 at 13:20









user151731user151731

1




1












  • using rp_fig = plt.Figure(figsize=(9, 9)) rp_ax = rp_fig.add_subplot(111) it works but I don't get why...

    – user151731
    Mar 25 at 14:46












  • plt.show() blocks the excution of any further code. When using matplotlib.figure.Figure() instead of plt.figure() you are not using pyplot, hence plt.show() has no figure to show and hence will not block.

    – ImportanceOfBeingErnest
    Mar 25 at 16:00

















  • using rp_fig = plt.Figure(figsize=(9, 9)) rp_ax = rp_fig.add_subplot(111) it works but I don't get why...

    – user151731
    Mar 25 at 14:46












  • plt.show() blocks the excution of any further code. When using matplotlib.figure.Figure() instead of plt.figure() you are not using pyplot, hence plt.show() has no figure to show and hence will not block.

    – ImportanceOfBeingErnest
    Mar 25 at 16:00
















using rp_fig = plt.Figure(figsize=(9, 9)) rp_ax = rp_fig.add_subplot(111) it works but I don't get why...

– user151731
Mar 25 at 14:46






using rp_fig = plt.Figure(figsize=(9, 9)) rp_ax = rp_fig.add_subplot(111) it works but I don't get why...

– user151731
Mar 25 at 14:46














plt.show() blocks the excution of any further code. When using matplotlib.figure.Figure() instead of plt.figure() you are not using pyplot, hence plt.show() has no figure to show and hence will not block.

– ImportanceOfBeingErnest
Mar 25 at 16:00





plt.show() blocks the excution of any further code. When using matplotlib.figure.Figure() instead of plt.figure() you are not using pyplot, hence plt.show() has no figure to show and hence will not block.

– ImportanceOfBeingErnest
Mar 25 at 16:00












0






active

oldest

votes










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55338758%2fincluding-matplotlib-figure-messes-up-tkinter-checkbuttons%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55338758%2fincluding-matplotlib-figure-messes-up-tkinter-checkbuttons%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해