无法获取电子邮件参数Python 2.7.13

时间:2018-09-24 06:16:42

标签: python-2.7 email

在Python 2.7中解析电子邮件时,我将所有值(对,抄送,密件抄送)都设置为无。这些API是否已被弃用?

import matplotlib.pyplot as plt
import numpy as np
import random

#build dataset as dictionary
data = {}
data['dataset1'] = {}
data['dataset2'] = {}
data['dataset3'] = {}

#simulate data
n = 100
for k,v in data.iteritems():
    upper = random.randint(0, 1000)
    v['sample A'] = np.random.uniform(0, upper, size=n)
    v['sample B'] = np.random.uniform(0, upper, size=n)
    v['sample C'] = np.random.uniform(0, upper, size=n)

fig, axes = plt.subplots(ncols=3, sharey=True)
fig.subplots_adjust(wspace=0)

#build subplots
for ax, name in zip(axes, ['dataset1', 'dataset2', 'dataset3']):
    ax.boxplot([data[name][item] for item in ['sample A', 'sample B', 'sample C']])
    ax.set(xticklabels=['sample A', 'sample B', 'sample C'], xlabel=name)
    ax.margins(0.05) # Optional

#plot labels
for ax in fig.axes:
    plt.sca(ax)
    plt.xticks(ha = 'right', rotation=45)

plt.show()

0 个答案:

没有答案