cvode-rust-wrap/examples/plot_oscillator.py

8 lines
299 B
Python
Raw Permalink Normal View History

2021-05-07 16:29:56 +00:00
import pandas as pd
import sys
import matplotlib.pyplot as plt
2021-06-10 13:11:53 +00:00
df = pd.read_csv(sys.stdin,names=['t','x',r'\dot{x}',r"dx_dx0", r"d\dot{x}_dx0", r"dx_d\dot{x}0", r"d\dot{x}_d\dot{x}0", r"dx_dk", r"d\dot{x}_dk"],index_col='t')
ax = df.plot(subplots=True)
2021-06-10 13:13:01 +00:00
plt.suptitle(r"\dotdot{x} = -k*x")
2021-05-07 16:29:56 +00:00
plt.show()