Advertisement
zqm98

plotly-resampler

Jun 3rd, 2025
298
0
5 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.52 KB | None | 0 0
  1. common_params = {
  2.     "opacity": 0.5,
  3.     "mode": "lines+markers",
  4.     "marker": {"size": 8, "opacity": 0.5},
  5. }
  6. fig = go.Figure()
  7. fig = FigureResampler(fig, create_overview=True)
  8. fig.add_trace(
  9.     go.Scattergl(name="Pivoted", **common_params),
  10.     hf_x=s_clip.index,
  11.     hf_y=s_clip,
  12. )
  13. fig.add_trace(
  14.     go.Scattergl(name="Interpolated", **common_params),
  15.     hf_x=s_interpolated.index,
  16.     hf_y=s_interpolated,
  17. )
  18. fig.update_layout(title=tag, xaxis_title="Time", yaxis_title="Value")
  19. fig.show_dash(mode="external")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement