added image example
This commit is contained in:
@ -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
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user