graphics
lattice
ggplot2
ggvis
plotly
dygraphs
taucharts
metricsgraphics
highcharter
echarts4r
graphics
with(cars, scatter.smooth(speed, dist, pch = 18, col = "dodgerblue4",
lpars = list(col = "red3", lwd = 2)))
grid(col = "gray80")
lattice
library(lattice)
xyplot(dist ~ speed, data = cars, type = c("p", "smooth"), pch = 18,
grid = TRUE, col = "dodgerblue4", col.line = "red3", lwd = 2)
ggplot2
library(ggplot2)
library(dplyr)
cars %>%
ggplot(data = ., aes(x = speed, y = dist)) +
geom_point(pch = 18, size = 2, color = "dodgerblue4") +
geom_smooth(se = FALSE, color = "red3", method = "loess", span = 2/3) +
theme_light()
ggvis
library(ggvis)
cars %>%
ggvis(x = ~speed, y = ~dist) %>%
layer_points(shape := "diamond", fill = "dodgerblue4", stroke := "black") %>%
layer_smooths(stroke := "firebrick", span = 2/3) %>%
hide_legend("fill")
plotly
dygraphs
taucharts
metricsgraphics
highcharter
echarts4r