10.10 曲线图

plot_ly(
  x = c(1, 2.2, 3), y = c(5.3, 6, 7), type = "scatter",
  mode = "markers+lines", line = list(shape = "spline"), color = I("#EA4335")
) %>%
  add_annotations(
    x = 2, y = 6, size = I(100),
    text = TeX("x_i \\sim N(\\mu, \\sigma)")
  ) %>% 
  layout(
    xaxis = list(showgrid = F, title = TeX("\\mu")),
    yaxis = list(showgrid = F, title = TeX("\\alpha"))
  ) %>% 
  config(displayModeBar = FALSE, mathjax = 'cdn')

图 10.5: 平滑曲线图