15 Python and R Charts with Interactive Controls: Buttons, Dropdowns, and Sliders

INTRODUCTION

It’s easy to add clean, stylish, and flexible dropdowns, buttons, and sliders to Plotly charts.

Below are 15 charts created by Plotly users in R and Python – each incorporate buttons, dropdowns, and sliders to facilitate data exploration or convey a data narrative.

Want to try this now? Plotly’s libraries for R and Python are free and open-source. Read our tutorial shorts for interactive controls in Python and R:


🔘 PART 1: BUTTONS IN PYTHON & R


1. BUTTONS TO SELECT WIND FARM PARKS

wind_turbines

Link to Chart: https://plot.ly/dashboard/jackp:17458/view

Animated Version: https://plot.ly/~jackluo/2164.embed

Tutorial for R: https://plot.ly/r/custom-buttons/

Tutorial for Python: https://plot.ly/python/custom-buttons/

Consider attending a workshop at PLOTCON for more help by a Plotly expert in creating advanced charts, dashboards, and controls with R and Python:

https://plotcon.plot.ly/workshops


2. BUTTONS TO CHANGE THE COLOR SCALE

colorscales

Link to Chart: https://plot.ly/dashboard/jackp:17448/view

Tutorial for R: https://plot.ly/r/custom-buttons/

Tutorial for Python: https://plot.ly/python/custom-buttons/

Consider attending a workshop at PLOTCON for more help by a Plotly expert in creating advanced charts, dashboards, and controls with R and Python:

https://plotcon.plot.ly/workshops


3. BUTTONS FOR BOX PLOT STATISTICS

box_plots

Tutorial to Chart: https://plot.ly/dashboard/jackp:17485/view

Tutorial for Python: https://plot.ly/~jackp/17482/

Consider attending a workshop at PLOTCON for more help by a Plotly expert in creating advanced charts, dashboards, and controls with R and Python:

https://plotcon.plot.ly/workshops


4. BUTTONS TO CHANGE THE CHART TYPE

chart_type

Link to Chart: https://plot.ly/~jackp/17249.embed

Tutorial for R: https://plot.ly/r/custom-buttons/

Tutorial for Python: https://plot.ly/~jackp/17258/

Consider attending a workshop at PLOTCON for more help by a Plotly expert in creating advanced charts, dashboards, and controls with R and Python:

https://plotcon.plot.ly/workshops


🕹️ PART 2: DROPDOWNS IN PYTHON & R


5. A DROPDOWN FOR OLYMPIC WINNERS🏅

winners

Link to Chart: https://plot.ly/~chelsea_lyn/12871/

Tutorial for R: https://plot.ly/r/dropdowns/

Tutorial for Python: https://plot.ly/python/dropdowns/

Consider attending a workshop at PLOTCON for more help by a Plotly expert in creating advanced charts, dashboards, and controls with R and Python:

https://plotcon.plot.ly/workshops


6. A DROPDOWN TO HIGHLIGHT A LINE

voltage_picker

Link to Chart: https://plot.ly/dashboard/jackp:17487/view

Tutorial for Python: https://plot.ly/~jackp/17484/

Consider attending a workshop at PLOTCON for more help by a Plotly expert in creating advanced charts, dashboards, and controls with R and Python:

https://plotcon.plot.ly/workshops


7. A DROPDOWN TO CHANGE MAP STYLE

map_styles

Link to Chart: https://plot.ly/dashboard/jackp:17458/view

Tutorial for Python: https://plot.ly/python/custom-buttons/ (scroll to bottom)

Consider attending a workshop at PLOTCON for more help by a Plotly expert in creating advanced charts, dashboards, and controls with R and Python:

https://plotcon.plot.ly/workshops


8. A DROPDOWN TO CHANGE MAP PROJECTION

projection

 

Link to Chart: https://plot.ly/~RPlotBot/4292/

Tutorial for R: https://plot.ly/r/sliders/ (scroll to bottom)

Consider attending a workshop at PLOTCON for more help by a Plotly expert in creating advanced charts, dashboards, and controls with R and Python:

https://plotcon.plot.ly/workshops


🎚️ PART 3: SLIDERS IN PYTHON & R


9. sliders to rotate A globe 🌍

spinning_globe

Link to Chart: https://plot.ly/~RPlotBot/4292/

Tutorial for R: https://plot.ly/r/sliders/ (scroll to bottom)

Consider attending a workshop at PLOTCON for more help by a Plotly expert in creating advanced charts, dashboards, and controls with R and Python:

https://plotcon.plot.ly/workshops


10. A SLIDER TO MODULATE A SINE WAVE

sine_wave

Link to Chart: https://plot.ly/~RPlotBot/4290/

Tutorial for R: https://plot.ly/r/sliders/

Tutorial for Python: https://plot.ly/python/sliders/

Consider attending a workshop at PLOTCON for more help by a Plotly expert in creating advanced charts, dashboards, and controls with R and Python:

https://plotcon.plot.ly/workshops


11. A SLIDER TO FADE A BACKGROUND IMAGE

cell_temperature

Link to Chart: https://plot.ly/dashboard/jackp:17486/view

Tutorial for Python: https://plot.ly/~jackp/17484

Consider attending a workshop at PLOTCON for more help by a Plotly expert in creating advanced charts, dashboards, and controls with R and Python:

https://plotcon.plot.ly/workshops


12. A RANGE SLIDER TO SELECT THE DATE

range_slider

Link to Chart: https://plot.ly/~jackp/17419/

Tutorial for R: https://plot.ly/r/range-slider/

Tutorial for Python: https://plot.ly/python/range-slider/

Consider attending a workshop at PLOTCON for more help by a Plotly expert in creating advanced charts, dashboards, and controls with R and Python:

https://plotcon.plot.ly/workshops


13. A SLIDER TO MODEL AN EQUATION

chebyshev

Link to Chart: https://plot.ly/~rreusser/89/

Tutorial for Python: https://plot.ly/~rreusser/90/chebyshev-points-for-least-squares-curve/

Consider attending a workshop at PLOTCON for more help by a Plotly expert in creating advanced charts, dashboards, and controls with R and Python:

https://plotcon.plot.ly/workshops


14. A SLIDER TO ANIMATE MORGTAGE RATES

mortgages

Link to Chart: http://lenkiefer.com/2017/01/29/fun-with-plotly

Tutorial for R: http://lenkiefer.com/2017/01/29/fun-with-plotly

Consider attending a workshop at PLOTCON for more help by a Plotly expert in creating advanced charts, dashboards, and controls with R and Python:

https://plotcon.plot.ly/workshops


15. A SLIDER TO CALCULATE MOVING AVERAGE

moving_average

Link to Chart: https://plot.ly/~jackluo/587

Tutorial for Python: https://plot.ly/~jackluo/2228

Alternate Tutorial for Python: https://plot.ly/~jackp/17421

Consider attending a workshop at PLOTCON for more help by a Plotly expert in creating advanced charts, dashboards, and controls with R and Python:

https://plotcon.plot.ly/workshops


If you’re looking for even more flexible controls for you Python or R charts, consider RStudio’s Shiny for R or Plotly’s Dash for Python.

Happy plotting,

-Plotly Team