大家好,我想将 Kaggle 的一个教程代码应用到鸢尾花数据集上。
但是当我执行绘图代码时,只能看到以下输出,而没有看到任何图形:
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")
%%matplotlib inline
或iris.plot(...).show()
。 - Wayne Werner