Plot with Plotly

Bence Szikora

2025-03-10

Introduction

Create a web page presentation using R Markdown that features a plot created with Plotly. Host your webpage on either GitHub Pages, RPubs, or NeoCities. Your webpage must contain the date that you created the document, and it must contain a plot created with Plotly.

Code for the plot

This slide contains the code for the next plot.

library("dplyr")
library("tidyr")
library("plotly")
## Warning: a(z) 'plotly' csomag az R 4.4.3 verziójával lett fordítva
stocks= as.data.frame(EuStockMarkets) %>%
    gather(index,price) %>%
    mutate(time=rep(time(EuStockMarkets),4))

plot_ly(x=stocks$time,y=stocks$price, color=stocks$index)
#date
A =Sys.Date()

The change of the price of four stocks in time

The date when I created the plot: 2025-03-10