March 2019
Intermediate to advanced
642 pages
22h 54m
English
Let's look at how to animate bubble plots:
import numpy as np import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation
def tracker(cur_num):
# Get the current index
cur_index = cur_num % num_points
# Set the color of the datapoints
datapoints['color'][:, 3] = 1.0
# Update the size of the circles
datapoints['size'] += datapoints['growth']
# Update the position ...
Read now
Unlock full access