Closed avanitanna closed 11 months ago
Workaround - use these imports to see the plots
%matplotlib inline
import matplotlib.pyplot as plots
from IPython.display import display, Image
Not sure if you need to have the IPython import, but you will require the %matplotlib inline
or similar magic command to ensure that matplotlib
knows which mode to display the plot in.
Here's the import block we use in our test cases and Data 8 curriculum:
from datascience import *
import numpy as np
%matplotlib inline
import matplotlib.pyplot as plt
plt.style.use('fivethirtyeight')
I'm closing this ticket out as this is known and expected for usage. Please feel free to re-open if you think there is something else that is being messed up in your environment altogether.
include "%matplotlib inline" in your code after importing libraries,
%matplotlib inline
is a command in Jupyter Notebooks that ensures Matplotlib-generated plots are displayed directly within the notebook interface.
I followed the documentation (for example, https://www.data8.org/datascience/_autosummary/datascience.tables.Table.scatter.html) and got the following error:
It seems like there's an issue with the way datascience communicates with matplotlib. Also, please find a screenshot attached showing that matplotlib works and then after an import statement (
from datascience import *
), matplotlib stops working.