Vertical slider with plotly python


How can I achieve a vertical slider in plotly-python?

Also, with the horizontal slider: yanchor does not move it above or below the plot but it moves it within the bottom of the plot. What am I doing wrong or not doing?

This is the code:

    steps = []
    for i in lenfigdatasintetic:
        step = dict(

    sliders = [dict(
        currentvalue={"prefix": "higher value"},
        pad={"t": 1.3},

Thanks a lot!


If I understand correctly you are looking for a slider for the y-axis, right? For the x-axis this is easily easily possible with rangeslider, see for example Rangeslider buttons for numerical not date data.

However, I don’t know if there is an equivalent for the y-axis? I would also like to know this, so add me to the list, please.

As a workaround, it could perhaps help to make the figure zoomable using the mouse scroll wheel, see

Hi Windrose, thank you for your help!

I tried to simplify the issue and got my question inaccurate.

I am plotting a heatmap. I am trying to manipulate the scale (zmin and zmax) with a slider. It works with the slider that I show in the snippet but I would like that slider to be vertical or even better, if I could take your idea of the rangeslider in the yaxis but updating the z data… Do you think that this is possible?

Thank you again!

I am sorry, but I am new to this too and not familiar with heat maps. Probably you know that you can specify the range on the y-axis also via fig.update_yaxes(range=[0, 10]) for example, however, that may not be what you are looking for?

1 Like