绘制散点图
数据准备北京16年3月、10月天气
技术要点:plt.scatter(x,y)
'''
a = [11,17,16,11,12,11,12,6,6,7,8,9,12,15,14,17,18,21,16,17,20,14,15,15,15,19,21,22,22,22,23]
b = [26,26,28,19,21,17,16,19,18,20,20,19,22,23,17,20,21,20,22,15,11,15,5,13,17,10,11,13,12,13,6]
'''
from matplotlib import pyplot as plt
from matplotlib import font_manager
my_font = font_manager.FontProperties(fname="/usr/share/fonts/truetype/arphic/uming.ttc")
// y_3轴为3年份天气
y_3 = [11,17,16,11,12,11,12,6,6,7,8,9,12,15,14,17,18,21,16,17,20,14,15,15,15,19,21,22,22,22,23]
// y_10 为10月份天气
y_10 = [26,26,28,19,21,17,16,19,18,20,20,19,22,23,17,20,21,20,22,15,11,15,5,13,17,10,11,13,12,13,6]
y = y_3 + y_10
y_min = min(y)
y_max = max(y)
plt.figure(figsize=(20, 8), dpi=80)
x_3 = list(range(1, 32))
x_10 = list(range(41, 72))
x = x_3 + x_10
plt.scatter(x_3, y_3, label="3月天气"