I created a different script using

import numpy as np
import matplotlib.pyplot as plt
import pandas as pd

did not use any declared matplotlib_converters or subplots_adjust and plots worked.

Image for post
Image for post

In your code when I commented out the show and fig.save it threw the error in a different place than before:

<matplotlib.collections.LineCollection at 0x2885c4d4a90>Error in callback <function install_repl_displayhook.<locals>.post_execute at 0x000002885BC4DB70> (for post_execute):---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
~\Anaconda3\lib\site-packages\matplotlib\pyplot.py in post_execute()
107 def post_execute():
108 if matplotlib.is_interactive():
--> 109 draw_all()
110
111 # IPython >= 2

~\Anaconda3\lib\site-packages\matplotlib\_pylab_helpers.py in draw_all(cls, force)

Interestingly when I put the [12] import and first fig statement in a cell by itself, before [moved to 13] fig.subplots_adjust and ax1 and ax2 statements and the [moved to 14]show statement in a separate one there are no errors but the show statement does not render a result.

Quite puzzling why isolating the fig = plt.figure(figsize=(10, 5)) and fig.subplots_adjust(left=0.05, right=0.95) statements to different cells did not throw an error although the code failed to render a plot.

I don’t remember ever using matplotlib_converters and subplots_adjust statements before and wonder if there is a Linux vs. Win64 issue with that.

Thanks for your support.

Dave

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store