fig <- plot_ly(data = df, x = c(1:31), y = df$Height,
marker = list(size = 10, color = "darksalmon",
line = list(color = "darkred", width = 2)),
type = "scatter", mode = "markers") %>%
layout(title = "Height of Cherry Trees")
ggplot(df, aes(c(1:31), Girth)) + geom_point() +
geom_smooth(method = lm, size = 1, color = "deeppink") +
labs(x = "Trees", title = "Girth of Cherry Trees")
## `geom_smooth()` using formula 'y ~ x'
ggplot(df, aes(Volume, Height)) + geom_point() +
geom_smooth(method = lm, size = 1, color = "maroon") +
labs(title = "Height against Volume of Cherry Trees")
## `geom_smooth()` using formula 'y ~ x'