#演示内容:二次回归和线性回归的拟合效果的对比
"""
print(__doc__)
import numpy as np
import matplotlib.pyplot as plt
from sklearn.linear_model import LinearRegression
from sklearn.preprocessing import PolynomialFeatures
from matplotlib.font_manager import FontProperties
font_set = FontProperties(fname=r"c:\windows\fonts\simsun.ttc", size=20)
def runplt():
plt.figure()# 定义figure
plt.title(u'披萨的价格和直径',fontproperties=font_set)
plt.xlabel(u'直径(inch)',fontproperties=font_set)
plt.ylabel(u'价格(美元)',fontproperties=font_set)
plt.axis([0, 25, 0, 25])
plt.grid(True)
return plt
1