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;
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
add a comment |
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
usingrp_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 usingmatplotlib.figure.Figure()instead ofplt.figure()you are not using pyplot, henceplt.show()has no figure to show and hence will not block.
– ImportanceOfBeingErnest
Mar 25 at 16:00
add a comment |
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
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
python python-2.7 matplotlib tkinter
asked Mar 25 at 13:20
user151731user151731
1
1
usingrp_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 usingmatplotlib.figure.Figure()instead ofplt.figure()you are not using pyplot, henceplt.show()has no figure to show and hence will not block.
– ImportanceOfBeingErnest
Mar 25 at 16:00
add a comment |
usingrp_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 usingmatplotlib.figure.Figure()instead ofplt.figure()you are not using pyplot, henceplt.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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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 usingmatplotlib.figure.Figure()instead ofplt.figure()you are not using pyplot, henceplt.show()has no figure to show and hence will not block.– ImportanceOfBeingErnest
Mar 25 at 16:00