如何在plotly中添加按钮来控制图形

How to add button in plotly to control the graph

我想使用 plotly 从 CSV 文件中绘制图表。 (其中有多个要绘制的列)。如何添加 button/tick/GUI-control 以便我可以控制图表中我想要的列。

我正在使用 Plotly-python 模块。

这里有一些选项:

  1. Custom buttons
  2. ipywidgets
  3. Plotly-Dash and Dash Core Components
  4. Plotly-Dash and HTML-buttons

您应该使用哪一个完全取决于您的用例。