summaryrefslogtreecommitdiff
path: root/plot.py
blob: 83438e5048ac5f50c2aa37baf68931846a0b5c1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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])