【发布时间】:2017-02-28 17:56:41
【问题描述】:
根据文档,我在熊猫中制作了这个情节:
import pandas as pd
import numpy as np
import pyplot as plt
df = pd.DataFrame(np.random.rand(140, 4), columns=['A', 'B', 'C', 'D'])
df['models'] = pd.Series(np.repeat(['model1','model2', 'model3', 'model4', 'model5', 'model6', 'model7'], 20))
plt.figure()
bp = df.boxplot(by="models")
如何修改此图?
我想要:
- 将排列从 (2,2) 修改为 (1,4)
- 更改标签和标题、文本和字体大小
- 删除“[models]”文本
以及如何将此图保存为 pdf 格式?
【问题讨论】:
标签: python pandas matplotlib