DevelopingDataProducts_week3

JB

2023-12-19

Developing Data Products Week 3 Project

Plot

# generating sample data
set.seed(123)
x <- seq(1, 10, by = 0.1)
y1 <- sin(x)
y2 <- cos(x)

plot_ly() %>%
  add_lines(x = ~x, y = ~y1, name = 'sin(x)', line = list(color = 'green')) %>%
  add_lines(x = ~x, y = ~y2, name = 'cos(x)', line = list(color = 'pink')) %>%
  layout(title = 'Sine and Cosine Functions',
         xaxis = list(title = 'X-axis'),
         yaxis = list(title = 'Y-axis'))

Thank you :)