import os import subprocess def plot(start, end, states=1, script="anim3d.plt"): path = 'gnuplot/' if os.name == 'nt': path = path.replace('/','\\') subprocess.run(["gnuplot", "-e", f"states={states};", "-e", f"start={start};" , "-e", f"end={end};", "-c", path + script])