Open In App
Related Articles

How to make sliders in Plotly?

Improve Article
Save Article
Like Article

A Plotly is a Python library that is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot, and many more. It is mainly used in data analysis as well as financial analysis. plotly is an interactive visualization library. 

Simple Slider Control

In plotly, a slider is a Tkinter object with which a user can set the values by moving an indicator. A slider can be vertically and horizontally arranged. In plotly, the slider can be formed by using the Scale method(). 

Example 1:


import plotly.graph_objects as px
import as go
import numpy as np
df =
x = df['total_bill']
y = df['day']
plot = px.Figure(data=[px.Scatter(


Example 2:


import as px
df =
fig = px.scatter(df, x="total_bill", y="tip"



Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 01 Oct, 2020
Like Article
Save Article
Similar Reads
Complete Tutorials