I'm following the tutorial in the book "introduction to machine learning with python" and i've copied the following code:
#create dataframe from data in X_train
#label the colums using the strings in iris_dataset.features_names
iris_dataframe = pd.DataFrame(X_train, columns = iris_dataset.feature_names)
#create a scatter matrix from the dataframe, color by y_train
pd.plotting.scatter_matrix(iris_dataframe,c=y_train,
figsize=(15,15), marker='o',
hist_kwds={'bins':20},s=60,
alpha=.8,
cmap=mglearn.cm3)
It should plot a graph,but it only print those lines:
array([[<matplotlib.axes._subplots.AxesSubplot object at 0x7f0d073934a8>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f0d07352908>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f0d07376e48>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f0d0732ee48>],
[<matplotlib.axes._subplots.AxesSubplot object at 0x7f0d072e3f28>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f0d072e3f60>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f0d07308ac8>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f0d07211400>],
[<matplotlib.axes._subplots.AxesSubplot object at 0x7f0d071ca470>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f0d07183470>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f0d071be470>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f0d07165e80>],
[<matplotlib.axes._subplots.AxesSubplot object at 0x7f0d07127390>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f0d070e5390>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f0d0709d390>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f0d07047da0>]], dtype=object)
Can someone tell me a reason?
EDIT-SOLVED:I do not know why but a after a re-run of the cells, the graph apperead..
matplotlib.pyplot.showyourself.%matplotlib inlineaxes = pd.plotting.scatter_matrix(iris_dataframe,c=y_train, ...