Print DataFrames and Plots in Tkinter GUI Application - python

I found pandastable package which print dataframes in Tkinter applications. I have two questions:
Is it possible to print dataframe in a new window instead in the application window? If yes, how to do it?
How can I add many matplotlib plots to application window? I would like to obtain something similar to Spyder plots bar and also plot them in a new window instead in the application window.

Related

How to make a only 1 window GUI in python?

I am trying to make a GUI in python that only consists of 1 window. I think this is better explained with examples. If you have say the settings app open on the computer when you click an option a new window doesn't pop up, the original window changes the a new layout. Is there a way to do this without deleting everything in the window and then adding new stuff, and when going back doing the same process.
If you're using a QT based gui framework like PyQT or PySimpleGUI, you can accomplish this task using a Tab object. Here is a link to a sample program with using Tabs in PySimpleGUI
PySimpleGUI is a really good option for getting your feet wet with GUI development in Python. You can get a lot done with very little code and learn about how GUI's work.

Embedding a PyQtGraph into a Tkinter GUI

I have a Tkinter GUI I've been working on for some time that has a live-plotting feature currently built in matplotlib. However, I'm finding matplotlib to be too slow (it seems to build up a lag over time, as if filling up a buffer of frames of incoming data), so I'm thinking of switching my plotting to PyQtGraph. Can I put this into my Tkinter app?
No, you cannot embed a PyQtGraph Object inside a tkinter application.

Matplotlib canvas doesn't embed in wx panel

I'm writing a class to embed some common configurations of graphs in a wx Notebook tab, but I'm running into a strange issue. When I try to add wx.Panel with the FigureCanvas, instead it floats the figure in another window entirely.
The odd thing is, the graph window resizes when I resize the main window. The figure comes out the correct size, just not in the right window.
My code is here. I can't see what I'm doing wrong, I've embedded matplotlib in wx before, but never in a Notebook. I can get it to embed on a simple GUI by itself just fine, just not in the tabs.
Try:
Make GraphTab a wxPanel rather than a wxFrame
Set all GraphTab to have nb as the parent (currently your first one has self as the parent.
I'm not sure whether this is everything, but it's a start.

tkinter: Is it possible to attach GUIs from different tkinter programs together and easily navigate across them?

I'd like to build a number of tkinter GUI apps and then stack them together either horizontally or vertically. I'd also like to navigate across the app easily once they become attached so that at any time I can focus on them.
One idea in my mind is that I can have a webpage like frame container, with a scrollbar, then drag other app's GUIs into it so that I can scroll across them.
To attach the windows, I understand that maybe I can get individual app's window through process info, but I just want to make sure if there is a built-in or better way of doing the things I want.
Seeing as you didn't capitalize tkinter, I'm going to assume that you are working in Python 3. If this is so, there are two options that I can think of: Using tkinter frames/grid geometry manager to place each widget side by side, and using tkinter.ttk Notebook to have multiple application tabs. you could also mess around with creating a scrollable tkinter Frame if you were dead set on the scrolling part, but from other Stackoverflow pages it appears that there is no native way to do that.
Example of tkinter.ttk Notebook

Why is my wx.App interfering with my matplotlib plots?

I am trying to build a GUI with wxPython to control a pretty stable, well-established model. The standard output of the model includes a series of plots to screen done via matplotlib. These plots are all OK if the model is run from the command line. If I run from my new GUI, however, they all show up, but I have no control over them: I can't click their respective "save" buttons; if they get covered up by other windows, they are "grayed out" when the blocking window is moved away. Things like that. If I close my GUI window, however, I get full control of my plots again. But this is no way to run this code.
I think my procedure is pretty standard. The bare outlines of the code are:
import wx
import model_code
class gui_for_model(wx.Frame):
# lots of stuff with hooks into model_code,
# including a "go" button that starts model_code running
#end of class
app=wx.App(False)
gm = gui_for_model()
app.MainLoop()
Anyone know what I should do differently? Thanks.
Here is a link to a site that has some demo code of using matplotlib with wxPython GUIs.
eli.thegreenplace.net/2008/08/01/matplotlib-with-wxpython-guis
Also this - matplotlib.org/faq/usage_faq.html talks about changing the backend.
And i found a package on pypi pypi.python.org/pypi/wxmplot/0.9.12

Categories

Resources