使图表更大 [英] Making a chart bigger in size
本文介绍了使图表更大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试获取更大的图表.但是,matplotlib中的Figure方法似乎无法正常工作.
I'm trying to get a bigger chart. However, the figure method from matplotlib does not seem to be working properly.
我收到一条消息,这不是错误:
I get a message, which is not an error:
import pandas.io.data as web
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
...
plt.figure(figsize=(20,10))
df2['media']= df2['SPY']*.6 + df2['TLT']*.4
df2.plot()
plt.show()
我的代码怎么了?
推荐答案
您可以跳过第一个plt.figure()
,而仅使用参数figsize:
You can skip the first plt.figure()
and just use the argument figsize:
df2.plot(figsize=(20,10))
请参见文档.
这篇关于使图表更大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文