Fixed yscale

This commit is contained in:
SimpleArt
2020-11-12 10:06:27 -05:00
parent e22ff55972
commit 555c187e39

View File

@ -27,15 +27,13 @@ class Matplotlib_Graph:
# Query for Y data
Y_list = self.database.get_generation_total_fitness()
# Set the y scale
plt.yscale(self.yscale)
if(self.yscale == "log"):
# If using log then the values have to be positive numbers
Y = [abs(ele) for ele in Y_list]
# Setup data
plt.figure(figsize = self.size)
plt.yscale(self.yscale)
self.type_of_plot(X,Y_list)
# x and y labels
@ -62,15 +60,13 @@ class Matplotlib_Graph:
# Query for Y data
Y_list = self.database.get_highest_chromosome()
# Set the y scale
plt.yscale(self.yscale)
if(self.yscale == "log"):
# If using log then the values have to be positive numbers
Y = [abs(ele) for ele in Y_list]
# Setup data
plt.figure(figsize = self.size)
plt.yscale(self.yscale)
self.type_of_plot(X,Y_list)
# x and y labels
@ -96,15 +92,13 @@ class Matplotlib_Graph:
# Query for Y data
Y_list = self.database.get_lowest_chromosome()
# Set the y scale
plt.yscale(self.yscale)
if(self.yscale == "log"):
# If using log then the values have to be positive numbers
Y = [abs(ele) for ele in Y_list]
# Setup data
plt.figure(figsize = self.size)
plt.yscale(self.yscale)
self.type_of_plot(X,Y_list)
# x and y labels
@ -117,6 +111,7 @@ class Matplotlib_Graph:
# Show the plot
plt.show()
# Getter and setters
@property
def type_of_plot(self):