From cd74bcda83d5aab9d0807da84a41ca4a3fba0959 Mon Sep 17 00:00:00 2001 From: danielwilczak Date: Mon, 1 Feb 2021 04:37:48 -0500 Subject: [PATCH] Fixed spacing. --- EasyGA/database/matplotlib_graph.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/EasyGA/database/matplotlib_graph.py b/EasyGA/database/matplotlib_graph.py index 04ff286..62ff1b4 100644 --- a/EasyGA/database/matplotlib_graph.py +++ b/EasyGA/database/matplotlib_graph.py @@ -12,6 +12,7 @@ class Matplotlib_Graph: 'bar' : plt.bar } + def __init__(self, database): self.database = database self.type_of_graph = 'line' @@ -20,6 +21,7 @@ class Matplotlib_Graph: self.yscale = "linear" self.legend = False + def all_config_id(self,function): """Graph each config_id's data stored in the database using multiple different colored lines.""" @@ -39,7 +41,6 @@ class Matplotlib_Graph: self.type_of_graph(x, y, label=f"Config_id - {config_id}") - def generation_total_fitness(self, config_id = None): """Show a plot of generation by generation total fitness.""" @@ -106,6 +107,7 @@ class Matplotlib_Graph: def show(self): """Used to show the matplot lib graph.""" + if self.legend == True: plt.legend()