笨鸟快飞呀 2021-08-08 11:56 采纳率: 50%
浏览 1581

求解决 执行pandas_alive时报错:FixedFormatter should only be used together with FixedLocator

从网上都有这段代码,但是就我的报错:
搞了好久了,毫无头绪
解决后 直接给悬赏

import pandas_alive
import pandas as pd

covid_df = pd.read_csv('data/covid19.csv', index_col=0, parse_dates=[0])
covid_df.plot_animated(filename='examples/example-barh-chart.gif', n_visible=15)

报错:

C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\python.exe C:/wj/aoyu/ayu.py
Generating BarChartRace, plotting ['Belgium', 'Brazil', 'Canada', 'China', 'France', 'Germany', 'India', 'Indonesia', 'Iran', 'Ireland', 'Italy', 'Mexico', 'Netherlands', 'Portugal', 'Spain', 'Sweden', 'Switzerland', 'Turkey', 'USA', 'United Kingdom']
C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pandas_alive\charts.py:221: UserWarning: FixedFormatter should only be used together with FixedLocator
  ax.set_yticklabels(self.df.columns)
C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\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()))
C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\matplotlib\animation.py:973: UserWarning: Animation was deleted without rendering anything. This is most likely unintended. To prevent deletion, assign the Animation to a variable that exists for as long as you need the Animation.
  warnings.warn(

Process finished with exit code 0
  • 写回答

3条回答 默认 最新

  • 尘世镜花恋 2021-08-08 12:10
    关注

    问题描述:这是一个用户警告,它告诉FixedFormatter(刻度形式) 只能与 FixedLocator定位器 一起使用,而不能使用其他方法改变刻度形式。

    评论

报告相同问题?

问题事件

  • 创建了问题 8月8日

悬赏问题

  • ¥15 Workbench中材料库无法更新,如何解决?
  • ¥20 如何推断此服务器配置
  • ¥15 关于github的项目怎么在pycharm上面运行
  • ¥15 内存地址视频流转RTMP
  • ¥100 有偿,谁有移远的EC200S固件和最新的Qflsh工具。
  • ¥15 有没有整苹果智能分拣线上图像数据
  • ¥20 有没有人会这个东西的
  • ¥15 cfx考虑调整“enforce system memory limit”参数的设置
  • ¥30 航迹分离,航迹增强,误差分析
  • ¥15 Chrome Manifest扩展引用Ajax-hook库拦截请求失败