Black Lives Matter. Please consider donating to Black Girls Code today.

Issue displaying incorrect graphs in notebook html (print preview) [solved]

I am using the offline mode for my notebooks and for some reason i’m having the following problem:

I have several different versions of the same notebook. All the graphs are built the same but the values should be different.

I am using the ‘Print Preview’ feature of the Jupyter Notebook and create HTML files for all the different versions.

My problem is that once i open the HTML files, The graphs displayed are sometimes coming from the wrong notebook!

Sometimes, a plot from one version appears in all other versions.

I was able to figure out that if I restart the kernel and run my code right before opening the HTML file of that specific version, i will get the correct graphs for that version.

I assume this has something to do with the online mode but i am not sure why this affects the HTML.

Anyway, hope someone can help me fix this.

Thanks in advance!

Check the names of the plots, are some the same?



Yup, that seemed to be the problem. thanks!