def update(num, context, axes, fig, args, should_draw):
    """ Run one frame of the simulation in context, writing changes to axes and fig """
    axes = context.update(axes, should_draw)
    if should_draw:
        fig.suptitle('Step: {}'.format(num))
    if num in args.snapshot:
        assert should_draw
        assert len(args.snapshot_name) > 0
        fig.savefig('{}-figure-{}.png'.format(args.snapshot_name, num))
    return axes