我有一个xlwings函数(ChartXYZ()
),它一直在正常工作。它将在excel中生成matplot图像。在
我现在添加了第二个xlwings函数(ChartSomethingElse()
),它还添加了另一个matplot图像。我已确保新图像和旧图像的名称不同。在
问题是-我现在在我的第一个函数(ChartXYZ()
)上出现以下错误:
TypeError: Don't know what to do with that image object
第二个函数(ChartSomethingElse()
)工作正常并生成matplot。在
功能一:
@xls.func
def plotHistData(ticker,field,startDate,endDate):
df = histdata(ticker,field,startDate,endDate)
sht = xls.Book.caller().sheets.active
fig = df.plot()
sht.pictures.add(fig, name=ticker+' hist', update=True)
return 'Plotted chart'
功能二:
^{pr2}$
目前没有回答
相关问题 更多 >
编程相关推荐