Using the airquality dataset, I will show the relationship between:
- Ozone
- Solar Radiation
- Temperature
- Wind Speed
Here I let Ozone be the outcome (y variable) and Solar.R the predictor (x variable). I color the points with a gradient indicating temperature, and let the size of the point indicate wind speed.
I plot (roughly) the same scatterplot twice. First I use ggplotly to convert a more familiar ggplot object into a plotly object. Second I use straight plotly syntax.