Black Lives Matter. Please consider donating to Black Girls Code today.

Two slider controls for single plot with two parameters

Trying to plot offline simultaneously two functions, for example, f(x) = k*x^n and g(x) =knx with two slider controls, one for choosing k and other for choosing n, I can’t figure out how to do it from reference (https://plot.ly/python/sliders/#simple-slider-control) and documentation. Is there any way to do?

1 Like

Hi @christian.carballo,

This use-case is not possible with the simple built-in layout sliders. But, if you’re working in the notebook then this is possible using FigureWidget along with ipywidgets sliders. See https://plot.ly/python/interact-decorator/ for an example of this approach.

Hope that helps!
-Jon

1 Like

Hello @jmmease,

Thank you very much for your fast response. It was very helpful to know how to solve it on notebook and I will now consider moving to it for this kind of representations.

Thank you,
Christian

1 Like

Hi @jmmease

I’m am also interested in multiple sliders for a single plot. However, making the plot in a notebook is not an option.

Is there any other option by now? Or expected in the future?

Best regards.