Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected behavior with ttk.Notebook - graph not loaded unless tab preselected #6570

Closed
Seymourr opened this issue Jun 10, 2016 · 0 comments

Comments

@Seymourr
Copy link

I use Python's tkinter lib with ttk as well, and I have noticed the following problem:

My app has a ttk.Notebook widget with 2 tabs, each showing a different graph with different data.
The graphs are drawn exactly as specified in https://www.youtube.com/watch?v=JQ7QP5rPvjU

The graphs read from two different text files, which are both open for continuous reading (im doing live graphs). The text files themselves are appended with new content from different processes, running at the same time my app does.

The problem is this: When initially starting my app and only seeing one of the tabs (the one currently selected), the seen graph is updated live accordingly as the writing process begins (started manually for simplicity after the app run). However, when then switching tab in the notebook widget, the other graph is empty - despite the text file associated with it clearly being populated with data.

Furthermore, if i start the tkinter app and click through all the tabs initially before doing the writing process (to fresh, empty files) all my graphs are drawn correctly.

I suspect that my problem lies with in how either tkinter load in the graph (establish a connection) or that ttk.Notebook somehow don't preload its widget.. But I have found no evidence of either.

Im sorry to not being able to provide any specific code, but as said, I draw the graphs according to the linked video, and manage the ttk.Notebook in the simplest way possible. Furthermore, the other processes writing to the files correctly writes to the files as intended (This has been checked redundantly).

Cheers for any tip

Matplotlibversion: latest (i keep it updated)
Python: 3.5
Platform: OS

Installed by using pip

To help us understand and resolve your issue please check that you have provided
the information below.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant