3

亲爱的,我正在尝试将 kaggle 教程代码应用于 Iris 数据集。

不幸的是,当我执行图表的代码时,我只能看到这个输出而没有看到任何图表:

matplotlib.axes._subplots.AxesSubplot at 0x9abf9b0

任何想法?

这是代码

import warnings # current version of seaborn generates a bunch of warnings that we'll ignore
warnings.filterwarnings("ignore")
import seaborn as sns
import matplotlib.pyplot as plt
sns.set(style="white", color_codes=True)

# Next, we'll load the Iris flower dataset, which is in the "../input/" directory
iris = pd.read_csv("../input/Iris.csv") # the iris dataset is now a Pandas DataFrame

# We'll use this to make a scatterplot of the Iris features.
iris.plot(kind="scatter", x="SepalLengthCm", y="SepalWidthCm")
4

1 回答 1

0

如果您使用的是 IPython Notebook,只需%pylab inline在制作绘图之前使用该命令。plt.show()如果没有,请在制作情节后尝试。

于 2016-04-06T15:04:00.690 回答