Python Matplotlib中的打印列表
我必须列出此类列表(系列和pred_upd): 我试着把它们放在一起,这样做:Python Matplotlib中的打印列表,python,list,matplotlib,plot,Python,List,Matplotlib,Plot,我必须列出此类列表(系列和pred_upd): 我试着把它们放在一起,这样做: az = series.plot(figsize=(12,8), label='o') ax = pred_upd.plot(style='r--', label='Dynamic Prediction'); ax.legend(); az.legend(); plt.plot() plt.show() 我收到错误消息: -> 2417 if isinstance(data, DataFra
az = series.plot(figsize=(12,8), label='o')
ax = pred_upd.plot(style='r--', label='Dynamic Prediction');
ax.legend();
az.legend();
plt.plot()
plt.show()
我收到错误消息:
-> 2417 if isinstance(data, DataFrame):
2418 if x is not None:
2419 if com.is_integer(x) and not data.columns.holds_integer():
TypeError: isinstance() arg 2 must be a type or tuple of types
我做错了什么?如果您正在使用,我认为您使用不正确。我真的无法推断变量系列和pred\u upd
是什么类型的类型,但我假设它们属于列表
类型(从您的示例中)
要使用matplotlib,请执行以下操作:
import matplotlib.pyplot as plt
plt.plot(series)
plt.hold(True)
plt.plot(pred_upd)
plt.show()
您可以在其中输入一些参数,但这应该是格式