I'm actually working on a project using google colaboratory. I'm using the pygad module(a Genetic Algorithm module). After running the algorithm, one can obtain the plot of a function, the fitness function, in such a way:
resultplot = ga_instance.plot_result()
Which returns the plot when executing the cell. However, the output of the function is None. If I use the resultplot.savefig('plot.png') function in this case I get an error.
Is there another way of saving the image with a command? Without having to use left click + save image as.
Thanks!
ga_instance.save(filename=filename)According to the manual Exsample, this is what saving to a file looks like.