mirror of
https://github.com/Alex38Lyon/Synthese-PSM_LARRA.git
synced 2026-11-29 19:58:36 +00:00
Graphiques
This commit is contained in:
1 parent
df20b1826b
commit
9eedbbf059
14 files changed
+122
-14
No files matched your search
+2
@@ -26,6 +26,7 @@
|
||||
"inverseses",
|
||||
"isolees",
|
||||
"jonctionnées",
|
||||
"LARRA",
|
||||
"lastrowid",
|
||||
"Lenght",
|
||||
"LENGHT",
|
||||
@@ -52,6 +53,7 @@
|
||||
"Sornin",
|
||||
"sqlite",
|
||||
"suprimmees",
|
||||
"Synthese",
|
||||
"tempplot",
|
||||
"Tete",
|
||||
"thconfig",
|
||||
|
||||
@@ -1545,6 +1545,29 @@ def calcul_stats(output_file_csv, output_file_md, filename="None"):
|
||||
formatted_row = [str(v) for v in _row]
|
||||
output_file_ligne_md.append("| " + " | ".join(formatted_row) + " |\n")
|
||||
|
||||
output_file_ligne_md.append("\n\n--------------\n")
|
||||
output_file_ligne_md.append(
|
||||
"### Graphiques\n\n"
|
||||
f"\n\n" # type: ignore
|
||||
f"\n\n" # type: ignore
|
||||
f"\n\n" # type: ignore
|
||||
f"""
|
||||
<p align="center">
|
||||
<img src="{output_file_name_rose}.png" alt="Répartition des directions" width="100%">
|
||||
</p>
|
||||
"""
|
||||
f"""
|
||||
<p align="center">
|
||||
<img src="{output_file_name_year}.png" alt="Développement par années" width="100%">
|
||||
</p>
|
||||
"""
|
||||
f"""
|
||||
<p align="center">
|
||||
<img src="{output_file_name_year}_Cum.png" alt="Développement cumulé" width="100%">
|
||||
</p>
|
||||
"""
|
||||
)
|
||||
|
||||
output_file_ligne_md.append("\n\n--------------\n")
|
||||
|
||||
output_file_ligne_md.extend(
|
||||
@@ -2011,7 +2034,7 @@ def sql_bilan_reseaux():
|
||||
global error_count
|
||||
global _largeurColTete
|
||||
retour_totaux = []
|
||||
retour_entrees = []
|
||||
# retour_entrees = []
|
||||
retour_reseaux = []
|
||||
retour_visee = []
|
||||
retour_sans = []
|
||||
@@ -2976,7 +2999,8 @@ def Rose(graph_name, bins=72):
|
||||
ax.bar(e[:-1], h, align="edge", width=e[1] - e[0])
|
||||
|
||||
# Save the rose diagram
|
||||
plt.savefig(graph_name)
|
||||
plt.savefig(graph_name + ".pdf")
|
||||
plt.savefig(graph_name + ".png")
|
||||
# Close the graph
|
||||
plt.close(plt.figure(1))
|
||||
|
||||
@@ -3009,7 +3033,8 @@ def Shot_lengths_histogram(graph_name, bins=72, log=None):
|
||||
plt.yscale("log")
|
||||
|
||||
# save
|
||||
plt.savefig(graph_name)
|
||||
plt.savefig(graph_name + ".pdf")
|
||||
plt.savefig(graph_name + ".png")
|
||||
plt.close(plt.figure(1))
|
||||
|
||||
|
||||
@@ -3152,6 +3177,7 @@ def PlotExploYears(graph_name, rangeyear=[1959, datetime.now().year], systems=No
|
||||
plt.ylabel("Longueur topographiée (m)")
|
||||
# Save the histogram
|
||||
plt.savefig(graph_name + ".pdf")
|
||||
plt.savefig(graph_name + ".png")
|
||||
plt.close(plt.figure(1))
|
||||
|
||||
# plot the cumulative histogram since the first survey
|
||||
@@ -3159,7 +3185,8 @@ def PlotExploYears(graph_name, rangeyear=[1959, datetime.now().year], systems=No
|
||||
plt.xlabel("Année")
|
||||
plt.ylabel("Longueur topographiée cumulée (km)")
|
||||
# Save the cumulative histogram
|
||||
plt.savefig(graph_name + "Cum.pdf")
|
||||
plt.savefig(graph_name + "_Cum.pdf")
|
||||
plt.savefig(graph_name + "_Cum.png")
|
||||
plt.close(plt.figure(1))
|
||||
|
||||
|
||||
@@ -3257,8 +3284,8 @@ if __name__ == "__main__":
|
||||
|
||||
output_file_name_log = outputfolder + input_file[:-4] + "_log.log"
|
||||
output_file_name = outputfolder + input_file[:-4] + "_stats"
|
||||
output_file_name_rose = outputfolder + input_file[:-4] + "_rose.pdf"
|
||||
output_file_name_histo = outputfolder + input_file[:-4] + "_histo.pdf"
|
||||
output_file_name_rose = outputfolder + input_file[:-4] + "_rose"
|
||||
output_file_name_histo = outputfolder + input_file[:-4] + "_histo"
|
||||
output_file_name_year = outputfolder + input_file[:-4] + "_year"
|
||||
imported_database = outputfolder + input_file[:-4] + "_stats.db"
|
||||
|
||||
|
||||
Reference in new issue
Block a user