Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/list/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Matplotlib中的打印列表_Python_List_Matplotlib_Plot - Fatal编程技术网

Python Matplotlib中的打印列表

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

我必须列出此类列表(系列和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, 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()
您可以在其中输入一些参数,但这应该是格式