In [1]:
%matplotlib inline
In [2]:
! cargo run --release --example swe > she.csv
In [3]:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
In [4]:
df = pd.read_csv("she.csv").set_index("time")
In [5]:
n = len(df.columns)
l = 100.0 # from example/swe.rs
x = np.arange(0, l, l/n)
In [6]:
X, T = np.meshgrid(df.index, x)
plt.figure(figsize=(10, 10))
plt.pcolormesh(T, X, df.T)
plt.colorbar()
plt.xlabel("space", fontsize=20)
plt.ylabel("time", fontsize=20)
plt.savefig("she.png", bbox_inches="tight", transparent=False)