How to perform mathematical function on data by clicking a button?

I need a button that will cut off values of function that are bigger than mean+std deviation

Hi @alexyalunin,

It’s not possible to run ad-hoc calculations on button presses using the built-in plotly.js buttons (the ones defined in the figure.layout hierarchy). To do this, I recommend using a FigureWidget+ipywidgets if you’re working in the Jupyter Notebook (, or Dash if you’d like to build a standalone webpage (

Hope that helps,