Skip to content Skip to sidebar Skip to footer

I Used Matplotlib, But The Error Message '
' Appeared With Graph

import matplotlib.pyplot as plt from matplotlib import font_manager, rc f_name = font_manager.FontProperties(fname='C:/Windows/Fonts/HANBatangExt.ttf').get_name() rc('font', famil

Solution 1:

It is not an error but the output you see is due to the fact that you have used

plt.figure(figsize=((10,8)))

after plt.plot. Therefore, you first get a figure on you screen and a figure object is created by plt.figure. To get rid of it, you should first set the figure size before plotting, something like this:

plt.figure(figsize=((10,8)))
plt.plot(run_before, run_after, 'ro-')
plt.plot(walk_before, walk_after, 'bo-')
plt.show()

There are other ways to set the figure size after plotting but since your code is fine enough, you are good to go with the above modification.

Post a Comment for "I Used Matplotlib, But The Error Message '
' Appeared With Graph"