Files
grum/exampledata.py
T
2022-12-19 11:32:31 +01:00

23 lines
388 B
Python

import numpy as np
from plotdesc import PlotDescription
X = np.arange(100) / 10
exampledata_raw = {
"sine": [X, np.sin(X)],
"cosine": [X, np.cos(X)],
"exp": [X, np.exp(X)],
"log": [X, np.log(X+1)]
}
exampledata = {}
for k, v in exampledata_raw.items():
pd = PlotDescription(title=k, xlabel="x", ylabel="y")
pd.xs, pd.ys = v
exampledata[k] = pd