Sep-09-2019, 02:44 AM
You can use
threading
. Divide your code into plot part and other part.from matplotlib import pyplot as plt import threading def yourFunc(): result = input("your input: ") print(result) def plot(): x, y = [0, 1], [0, 1] plt.plot(x, y) plt.show() def main(): mthread = threading.Thread(target=yourFunc) mthread.start() plot() mthread.join() main()