Für Vorlesungen, bitte die Webseite verwenden. https://flavigny.de/lecture
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
476B

  1. library(ggplot2)
  2. library(tibble)
  3. x_plt <- seq(0, 1, len=7)
  4. tb <- tibble(
  5. x_val = rep(x_plt, times=3),
  6. y_val = c(sin(2*pi*x_plt)/2+0.5, x_plt^2, sqrt(x_plt)),
  7. fun = rep(c("sin", "sqr", "sqrt"), each=length(x_plt)))
  8. tb$z_val = abs(0.5-tb$x_val)+0.1
  9. plt <- ggplot(data = tb, mapping = aes(x = x_val, y = y_val, color=fun)) +
  10. geom_line(mapping = aes(linetype=fun), size = 1.2) +
  11. geom_point(color = "black", mapping = aes(size = z_val))
  12. print(plt)