import matplotlib.pyplot as plt
import pandas as pd
import pylab as pl
import numpy as np
%matplotlib inline
!wget -O FuelConsumption.csv https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-
data/CognitiveClass/ML0101ENv3/labs/FuelConsumptionCo2.csv
df = pd.read_csv("FuelConsumption.csv")
df.head()
df1 = df[['ENGINESIZE','CYLINDERS','FUELCONSUMPTION_COMB','CO2EMISSIONS']]
df1.head(9)
plt.scatter(df1.ENGINESIZE , df1.CO2EMISSIONS , color = "black")
plt.xlabel=("enginesize")
plt.ylabel=("emission")
plt.show()
当我尝试运行这段代码时,我得到了没有轴标签的散点图。如果有人可以帮助我,我该如何获得轴标签?
交互式爱情
相关分类