magland / spikesortingview

Figurl views of spike sorting results
Apache License 2.0
1 stars 0 forks source link

TimeseriesGraph: additional attributes #106

Closed magland closed 2 years ago

magland commented 2 years ago

For a marker we would have

{color?: string, shape?: 'circle' | 'square' | 'triangle, radius?: number}

For a line we would have

{color?: string, width?: number, dash?: [number, number]}

The "?" indicates optional.

magland commented 2 years ago

This has now been implemented, but not released to pypi yet. Works from main branch.

Example: https://github.com/magland/sortingview/blob/main/examples/example_timeseries_graph.py

https://figurl.org/f?v=gs://figurl/spikesortingview-9&d=sha1://f649d425bb2f3480034dbd8bfc10425157083513&label=Timeseries%20graph%20example

G.add_line_series(name='3', t=t.astype(np.float32), y=v.astype(np.float32), color='green', width=5, dash=[12, 8])
G.add_marker_series(name='4', t=t.astype(np.float32), y=v.astype(np.float32), color='black', radius=8, shape='square')