Monday, 28 December 2020

Plotting charts in python cmd.Cmd

I am trying to plot some data in CLI. I am looking to plot multiple charts in separate window and it should not block CLI so that I can still give commands in CLI.

class CLI(cmd.Cmd):

    def __init__(self):
        super().__init__()

    def do_plot(self):
        # plot here


if __name__ == '__main__':
    CLI().cmdloop()

method 1: using matplotlib

I came to know that matplotlib is not thread safe.

method 2: pyqtgraph

I have asked a detail question here : https://forum.qt.io/topic/122033/running-multiple-plots-with-pyside2, still no solution.

Only solution I can think of now is that to write separate program and connect it with CLI using socket and share data. Is there any easy and efficient way to do it?



from Plotting charts in python cmd.Cmd

No comments:

Post a Comment