Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

How to set xlim when save some frames to file by matplotlib in python?

$
0
0

I use python and matplotlib to create bar chart race animation, the data is time series and keep update every day. I want only save updated frames to file, for example, the frames are 10460 unti yesterday, the video file created in one hour.enter image description here

The new 10 frames are appended today, I used code to save the newest frames to file as below, but axis a is too short, how can I set axis x to the same as max x in past?

anim = FuncAnimation(self.fig, self.anim_func, frames[10460:], init_func, interval=interval)

enter image description here


Viewing all articles
Browse latest Browse all 23131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>