Skip to content

Original frame persists in animation #22

@dstansby

Description

@dstansby

Describe the bug

Reporting sunpy/sunpy#5967 upstream. See https://docs.sunpy.org/en/stable/generated/gallery/plotting/lineAnimator_examples.html for the animation that looks wrong. I can reproduce this locally too.

To Reproduce

import matplotlib.pyplot as plt
import numpy as np
from mpl_animators import LineAnimator

data_shape0 = (10, 20)
data0 = np.random.rand(*data_shape0)

plot_axis0 = 1
slider_axis0 = 0

xdata = np.tile(np.linspace(0, 100, (data_shape0[plot_axis0] + 1)), (data_shape0[slider_axis0], 1))

ani = LineAnimator(data0, plot_axis_index=plot_axis0, axis_ranges=[None, xdata]).get_animation()

plt.show()

Screenshots

No response

System Details

No response

Installation method

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions