added image example

This commit is contained in:
2023-05-12 11:17:18 +02:00
parent 2d11fe4ff9
commit 438d5c1eea

View File

@ -1,6 +1,6 @@
import numpy as np
from .descs import PlotDescription
from .descs import PlotDescription, ImageDescription
X = np.arange(100) / 10
@ -31,4 +31,18 @@ for name, (xs, ys) in exampledata_raw.items():
)
name = "image"
xdim = ydim = 100
size = xdim * ydim
shape = (xdim, ydim)
img = np.arange(size).reshape(shape) / size
img += np.random.random(shape) / 10
exampledata[name] = ImageDescription(
name,
image=img
)