From d23ca2127efcc771ba495442e4addebe417a1eaa Mon Sep 17 00:00:00 2001 From: Andrea Fiorencis Date: Mon, 23 Jun 2025 12:06:36 +0200 Subject: [PATCH] fix titoli grafici --- Fotovoltaico.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Fotovoltaico.py b/Fotovoltaico.py index b9153eb..fef41f6 100644 --- a/Fotovoltaico.py +++ b/Fotovoltaico.py @@ -54,7 +54,7 @@ print("Valore massimo:",max(result_ac_energies_to_csv_df.gen_pv_100_kWp)) # prin print("Somma totale:",sum(result_ac_energies_to_csv_df.gen_pv_100_kWp)) # print the total sum of the generated energy result_ac_energies_to_csv_df.to_csv(path_export, encoding='utf-8') -def generate_grafico_df(dataframe): +def generate_grafico_df(dataframe, graphTitle): # GENERAZIONE GRAFICO import plotly.express as px # Supponendo che la colonna di interesse sia 'gen_pv_100_kWp' @@ -62,7 +62,7 @@ def generate_grafico_df(dataframe): dataframe, x=dataframe.index, y='gen_pv_100_kWp', - title='Produttività Fotovoltaica nel Tempo', + title=graphTitle, labels={'gen_pv_100_kWp': 'Energia [kWh]', 'index': 'Data/Ora'} ) fig.show() @@ -84,8 +84,8 @@ path_export_hourly = path_export.replace('.csv', '_hourly.csv') df_hourly = export_hourly_pv_productivity(result_ac_energies_to_csv_df, path_export_hourly) # GENERAZIONE GRAFICI -generate_grafico_df(result_ac_energies_to_csv_df) -generate_grafico_df(df_hourly) +generate_grafico_df(result_ac_energies_to_csv_df, 'Produttività Fotovoltaica nel Tempo') +generate_grafico_df(df_hourly, 'Produttività Fotovoltaica a Base Oraria') if joePlaying: joe.terminate()