I am writing a code in python that opens the terminal, and goes to gnuplot. The problem is that after entering the gnuplot, the lines that follows the code aren't read, and so does nothing. What could i do in such way that the codes remain running, even after open the gnuplot?
import os
os.system("gnuplot; p 'd.dat'")
os.system(f"f(x) = a*cos(b*(x-c))+d")
os.system(f"a = at")
As above shows, after the codes write gnuplot on the terminal, it opens the gnuplot and it stops to run. That is, it does not write. I would expect it writes p "d.dat" after opening the gnu terminal.