Edinburgh-Chemistry-Teaching/Data-driven-chemistry

Unit_05_II_plotting Task 1.1: plt.savefig does not work on Colab

jasmin-guven opened this issue · 2 comments

Trying to save the plotted figure to images/myfigure.png results in an error.

My guess is that we need to copy the images directory as is done with data at the start?

try:
    import google.colab
    IN_COLAB = True
except:
    IN_COLAB = False
if IN_COLAB:
    # copy over data repository
    !git clone https://github.com/Edinburgh-Chemistry-Teaching/Data-driven-chemistry
    !cp -r Data-driven-chemistry/Unit_05/data .

Screenshot 2023-03-01 at 11 18 50

I can fix this!

2201faa fixes this.