class: center, middle, inverse, title-slide .title[ # Interactive Graphs with Plotly ] .author[ ### María del Pilar Morales Ávila ] --- # Introduction **Date:** July 03, 2025 - This presentation shows the use of the **Plotly** package in R to create interactive visualizations. - Based on the original report published on RPubs. --- # Load Libraries ``` r library(plotly) library(ggplot2) ``` --- # Plot 1: Interactive Histogram ``` r data <- mtcars plot_ly(data, x = ~mpg, type = "histogram") ```
--- # Plot 2: Scatter Plot ``` r plot_ly(data, x = ~wt, y = ~mpg, type = "scatter", mode = "markers") ```
--- # Plot 3: 3D Surface Plot ``` r plot_ly(z = ~volcano) %>% add_surface() ```
--- # Plot 4: Line Chart ``` r x <- seq(0, 2*pi, length.out = 100) y <- sin(x) plot_ly(x = ~x, y = ~y, type = 'scatter', mode = 'lines') ```
--- # Conclusion - Plotly is a powerful library for creating interactive visualizations in R. - It integrates well with RStudio and is ideal for exploratory data analysis and dashboards. --- # Thank You 🙌 Any questions?