Fixed spacing.

This commit is contained in:
danielwilczak
2021-02-01 04:37:48 -05:00
parent c259e1ddd3
commit cd74bcda83

View File

@ -12,6 +12,7 @@ class Matplotlib_Graph:
'bar' : plt.bar 'bar' : plt.bar
} }
def __init__(self, database): def __init__(self, database):
self.database = database self.database = database
self.type_of_graph = 'line' self.type_of_graph = 'line'
@ -20,6 +21,7 @@ class Matplotlib_Graph:
self.yscale = "linear" self.yscale = "linear"
self.legend = False self.legend = False
def all_config_id(self,function): def all_config_id(self,function):
"""Graph each config_id's data stored in the database """Graph each config_id's data stored in the database
using multiple different colored lines.""" using multiple different colored lines."""
@ -39,7 +41,6 @@ class Matplotlib_Graph:
self.type_of_graph(x, y, label=f"Config_id - {config_id}") self.type_of_graph(x, y, label=f"Config_id - {config_id}")
def generation_total_fitness(self, config_id = None): def generation_total_fitness(self, config_id = None):
"""Show a plot of generation by generation total fitness.""" """Show a plot of generation by generation total fitness."""
@ -106,6 +107,7 @@ class Matplotlib_Graph:
def show(self): def show(self):
"""Used to show the matplot lib graph.""" """Used to show the matplot lib graph."""
if self.legend == True: if self.legend == True:
plt.legend() plt.legend()