Block 39: Interactive Visualizations with Plotly (Intro)
Create interactive charts that users can zoom and hover.
Concepts
- import plotly.express as px
- px.scatter(), px.bar(), px.histogram()
- hover_data and color parameters
- fig.show() and saving to HTML
Code Examples
See exercise below.
Exercise
Recreate the Iris scatter plot as an interactive Plotly chart with species hover info. Export it as an HTML file you can open in a browser.
Homework
Compare Matplotlib, Seaborn, and Plotly: when would you choose each?