08 · Explorative Datenanalyse und Datenvisualisierung
verteilung_laktat_nach_grund.png
Abbildung · Quellcode

Erzeugt in plot_lactate_boxplot() – hier steht nur der Teil, der zeichnet in module/08-eda-visualisierung/code/python.py, Zeile 119–136.
Python
Python-Code: in eine Datei mit Endung
.py schreiben und mit dem ▶-Knopf in VS Code ausführen – oder Zeile für Zeile in die Python-Konsole. Setzt die in Modul 02 eingerichtete Umgebung voraus.fig, ax = plt.subplots(figsize=(8, 4)) sns.boxplot( data=df, x="aufnahmegrund", y="laktat_mmol_l", order=order, hue="aufnahmegrund", palette="Set2", legend=False, ax=ax, flierprops=dict(marker="o", markersize=4, alpha=0.5), ) ax.set_xlabel("Aufnahmegrund") ax.set_ylabel("Laktat (mmol/l)") ax.set_title("Laktatverteilung nach Aufnahmegrund") fig.tight_layout() path = FIGURE_DIR / "verteilung_laktat_nach_grund.png" fig.savefig(FIGURE_DIR / "verteilung_laktat_nach_grund.png", dpi=120) # literal path: lets the site link this code