You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request ahmedfgad#47 from rengel8/save-matplot-option
Two changes in the `plot_result()` method.
1) Rename the parameter to `save_dir`. If it is not None, then save.
2) Keep the `.show()` function called regardless of saving the figure or not.
defplot_result(self, title="PyGAD - Iteration vs. Fitness", xlabel="Generation", ylabel="Fitness", linewidth=3):
2795
+
defplot_result(self, title="PyGAD - Iteration vs. Fitness", xlabel="Generation", ylabel="Fitness", linewidth=3, save_dir=None):
2796
2796
2797
2797
"""
2798
2798
Creates and shows a plot that summarizes how the fitness value evolved by generation. Can only be called after completing at least 1 generation. If no generation is completed, an exception is raised.
0 commit comments