Für Vorlesungen, bitte die Webseite verwenden. https://flavigny.de/lecture
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

21 Zeilen
621B

  1. library(ggplot2)
  2. library(tibble)
  3. x_plt1 <- seq(0,1,len=1000)
  4. x_plt2 <- seq(0,1,len=200)
  5. plt_data1 <- tibble(
  6. x_val = x_plt1,
  7. y_val1 = x_plt1^2,
  8. y_val2 = sqrt(x_plt1))
  9. plt_data2 <- tibble(
  10. x_val = x_plt2,
  11. y_val = sin(2*pi*x_plt2)/2+0.5)
  12. plt <- ggplot(data = plt_data1, mapping = aes(x = x_val)) +
  13. geom_line(mapping = aes(y = y_val1), color="blue") +
  14. geom_line(mapping = aes(y = y_val2), color="red") +
  15. geom_line(data = plt_data2, mapping = aes(x = x_val, y = y_val), color="red") +
  16. geom_point(data = plt_data2, mapping = aes(x = x_val, y = y_val), color="cyan")
  17. print(plt)