2026-03-19
| Name | Inhalt |
|---|---|
d_ns_m |
Monatswerte für Niederschläge in Bochum |
Quelle: https://www.dwd.de
f1 berechnet x^2function(x) x^2 die Funktion mit dem Namen f1dnorm(x, mean = mu, sd = sigma)x, Mittelwert mu und Standardabweichung sigmageom_function()geom_function() plottet Kurve ohne Mappingfun = <Funktion>→ Plotbereich nicht gut gewählt
lims(x = c(xmin, xmax)) explizit angebengeom_ribbon()stat = "function" Funktion plottenx und y aus after_stat(x) und after_stat(y)
f für Normalverteilung x mit mu und sigmaf vorher erzeugt (vorherige Folie)geom_qq() und geom_qq_line()ggplot() gilt für alle Geomsgeom_density()fill = <Farbe> und Transparenz alpha = <Wert>ggplot(data = d_ns_m, mapping = aes(x = Niederschlag)) +
geom_histogram(mapping = aes(y = stat(density)), binwidth = 10, boundary = 0) +
geom_density(bw = 2, linewidth = 1, color = "orange") +
geom_density(bw = 4, linewidth = 1, color = "blue") +
geom_density(bw = 8, linewidth = 1, color = "red") +
lims(x = c(-20, 220))bw = <Wert> legt die Breite des Kerns fest (bw = bandwidth)bw umso glatter die Kurvealphaggridges)geom_density_ridges() wie geom_density() aber untereinanderbandwidth = <Wert> angebengeom_function()xlim festlegengeom_line, z.B. linewidthgeom_ribbon()stat berechnet (hier: x und y)geom_function()geom_density()| AES | Beschreibung | Optional |
|---|---|---|
| x | Merkmal für Dichte | Nein |
| AES/Argumente | Beschreibung | Optional |
|---|---|---|
| color | Farbe der Linie | Ja |
| fill | Füllfarbe | Ja |
| alpha | Transparenz der Füllfarbe | Ja |
| Argumente | Beschreibung | Optional |
|---|---|---|
| kernel | Art des Kerns (“gaussian”, “epanechnikov”, “cosine”, …) | Ja |
| bw | Glättungsbreite h | Ja |
| AES | Beschreibung | Optional |
|---|---|---|
| sample | Merkmal mit Daten | Nein |
| Argumente | Beschreibung | Optional |
|---|---|---|
| color | Farbe | Ja |
| AES | Beschreibung | Optional |
|---|---|---|
| x | Merkmal für Dichte | Nein |
| y | Merkmal einzelne Plots | Nein |
| AES/Argumente | Beschreibung | Optional |
|---|---|---|
| color | Farbe der Linie | Ja |
| fill | Füllfarbe | Ja |
| alpha | Transparenz der Füllfarbe | Ja |
| Argumente | Beschreibung | Optional |
|---|---|---|
| bandwidth | Glättungsbreite h | Ja |
→ Wie Boxplot
Bausteine Computergestützter Datenanalyse