首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Python画图问题,总出现警告,怎么解决呢?

Python画图问题,总出现警告,怎么解决呢?

提问于 2023-07-24 16:10:23
回答 0关注 0查看 72

import pandas as pd

import pandas_alive

import matplotlib.pyplot as plt

import matplotlib.ticker as mticker

plt.style.use('ggplot')

elec_df=pd.read_csv("D:\Aus_Elec_Gen_1980_2018.csv",index_col=0,parse_dates=[0],thousands=',')

#缺省值0填充、绘图

ax_main=elec_df.fillna(0).plot_animated(

'electricity-generated-australia.gif',

period_fmt="%d/%m/%Y",

title='Australian Electricity Sources 1980-2018',

perpendicular_bar_func='mean',

cmap='Set1',

n_isible=5,

orientation='h',)

最终警告:

d:\Users\zhang\Anaconda3\lib\site-packages\pandas_alive\charts.py:221: UserWarning: FixedFormatter should only be used together with FixedLocator

ax.set_yticklabels(self.df.columns)

d:\Users\zhang\Anaconda3\lib\site-packages\pandas_alive\charts.py:222: UserWarning: FixedFormatter should only be used together with FixedLocator

ax.set_xticklabels([max_val] * len(ax.get_xticks()))

请问怎么解决呢

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档