Figurl Timeseries Graph Example
import numpy as np
import sortingview.views as vv
G = vv.TimeseriesGraph(
legend_opts={'location': 'northwest'},
y_range=[-15, 15], hide_x_gridlines=False, hide_y_gridlines=True
)
n1 = 5000
t = np.arange(0, n1) / n1 * 10; v = t * np.cos((2 * t)**2)
G.add_line_series(name='blue line', t=t, y=v.astype(np.float32), color='blue')
n2 = 400
t = np.arange(0, n2) / n2 * 10; v = t * np.cos((2 * t)**2)
G.add_marker_series(name='red marker', t=t, y=v.astype(np.float32), color='red', radius=4)
v = t + 1
G.add_line_series(name='green dash', t=t, y=v.astype(np.float32), color='green', width=5, dash=[12, 8])
t = np.arange(0, 12) / 12 * 10; v = -t - 1
G.add_marker_series(name='black marker', t=t, y=v.astype(np.float32), color='black', radius=8, shape='square')
print(G.url(label='TimeseriesGraph-Example'))
https://figurl.org/f?v=gs://figurl/spikesortingview-10&d=sha1://e6ca2d115aa3b92b6da77643f07349cb8f9b5546&label=TimeseriesGraph-Example