Skip to content

Commit 166fdf2

Browse files
committed
Improve deleted Animation warning
Closes #20909.
1 parent 57db263 commit 166fdf2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/matplotlib/animation.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -888,9 +888,9 @@ def __del__(self):
888888
if not getattr(self, '_draw_was_started', True):
889889
warnings.warn(
890890
'Animation was deleted without rendering anything. This is '
891-
'most likely unintended. To prevent deletion, assign the '
892-
'Animation to a variable that exists for as long as you need '
893-
'the Animation.')
891+
'most likely not intended. To prevent deletion, assign the '
892+
'Animation to a variable `anim` that exists until you have '
893+
'outputted the Animation using `plt.show()` or `anim.save()`.')
894894

895895
def _start(self, *args):
896896
"""

0 commit comments

Comments
 (0)