Promotion: Exportfunktion für scp-Export in export_figure_local integriert

This commit is contained in:
2025-07-29 19:37:43 +02:00
parent 89887edc1c
commit 6830dd4531
3 changed files with 30 additions and 12 deletions

View File

@ -152,8 +152,8 @@ fig.update_layout(**layout)
# --- Export-Funktion ---
def export_figure(fig, name, export_flag_html, export_flag_png):
from config_deskriptive_literaturauswahl import export_path_png, export_path_html
safe_name = name.replace(" ", "_").replace("/", "_").lower()
from slugify import slugify
safe_name = slugify(name)
html_path = f"/tmp/{safe_name}.html"
if export_flag_html:
fig.write_html(html_path, include_plotlyjs='cdn', config={"responsive": True})
@ -175,4 +175,5 @@ def export_figure(fig, name, export_flag_html, export_flag_png):
# --- Export ---
export_figure(fig, "silhouette_scores_und_fallzahlen", export_fig_silhouette_plot, export_fig_png)
fig.show()