On 2017-10-27 07:18, Andrew Z wrote: > Hello, > i'd like to create a graph/plot based a DB table's data, but not sure > where to start. I > > also would like to have the following functionality: > a. i'd like to have it in the separate window ( xwindow to be precise). > b. and i'd like to have the graph updating with every record added to the > table. > > The workflow: > a. main code is running and occasionally adding records to the table > b. graph gets updated "automagically" and is shown in a separate from the > main terminal window. > > Main program does not have GUI, nor is Web based, just runs in the terminal > on Xwindows. > > i don't' really care about cross-platform compability and only want to run > that on linux xwindows. > > Thank you for your advise. >
Matplotlib <https://matplotlib.org/> is the standard Python plotting library, and it has GUI backends (Tk, Qt, Gtk, ...) that should be perfectly suitable for your purposes. The API maybe takes some getting used to, but there are plenty of examples to be found around the web, and the main documentation is quite good. If you need the plots to update quickly (it doesn't sound like it) then you might need to luck into something else, like pyqtgraph or vispy. -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list