From 812d0477c5713923ae82ac13307c7b7e21f7566d Mon Sep 17 00:00:00 2001 From: pseusys Date: Sun, 26 Feb 2023 18:48:37 +0100 Subject: [PATCH] y_lim adjusted --- sources/graphics_chart_drawer.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sources/graphics_chart_drawer.py b/sources/graphics_chart_drawer.py index c8b0112..d408ae7 100644 --- a/sources/graphics_chart_drawer.py +++ b/sources/graphics_chart_drawer.py @@ -9,7 +9,6 @@ from manager_download import DownloadManager as DM MAX_LANGUAGES = 5 # Number of top languages to add to chart, for each year quarter GRAPH_PATH = "assets/bar_graph.png" # Chart saving path. -GRAPH_Y_ZOOM = 1.3 async def create_loc_graph(yearly_data: Dict, save_path: str): @@ -65,6 +64,6 @@ async def create_loc_graph(yearly_data: Dict, save_path: str): ax.spines["top"].set_visible(False) ax.spines["right"].set_visible(False) - plt.ylim(top=GRAPH_Y_ZOOM * amax(cumulative[:, 0]), bottom=-GRAPH_Y_ZOOM * amax(cumulative[:, 1])) + plt.ylim(top=1.1 * amax(cumulative[:, 0]), bottom=-1.5 * amax(cumulative[:, 1])) plt.savefig(save_path, bbox_inches="tight") plt.close(fig)