matplotlib - 如何增加饼图的大小
问题描述
sales2 = sales.groupby(['State'])[['Sales2016']].sum()
sales2graph = sales2.plot(kind='pie',
labels=sales2['Sales2016'],
colors=['r', 'g', 'b'],
autopct='%1.0f%%', # to get percentage and round off appropriately
fontsize=10,
subplots='true')
解决方案
使用figsize
:
sales2graph = sales2.plot(kind='pie',
labels=sales2['Sales2016'],
colors=['r', 'g', 'b'],
autopct='%1.0f%%', # to get percentage and round off appropriately
fontsize=10,
subplots='true',
figsize=(10,8))
推荐阅读
- reactjs - 如何返回具有递增或递减值的 redux 状态?
- php - xhttp.send() 命令,“被 CORS 策略阻止:仅支持跨源请求......”等
- php - 将 Strtotime('now') 拆分为秒和分钟
- gnuplot - 与 gnuplot 格式说明符 %t 和 %T 不一致?
- python - python-docx 为每个段落设置不同的样式
- pdfbox - 遍历 PDF 文件上的文本对象/框/标签
- amazon-web-services - IntelliJ Dockerfile 运行/调试配置:如何添加本地 AWS 凭证?
- android - Android 应用程序上下文配置不会使用新的语言环境进行更新
- excel - Excel:基于输入的数字动态列表
- visual-studio - 如何更改 VS 中的参数信息工具提示颜色