Skip to content

Commit b6249c9

Browse files
committed
Skip invisible artists when doing 3d projection.
This is particularly important when the vast majority of artists are expected to be invisible, e.g. when using ArtistAnimation.
1 parent b525983 commit b6249c9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,8 @@ def do_3d_projection(artist):
437437

438438
collections_and_patches = (
439439
artist for artist in self._children
440-
if isinstance(artist, (mcoll.Collection, mpatches.Patch)))
440+
if isinstance(artist, (mcoll.Collection, mpatches.Patch))
441+
and artist.get_visible())
441442
if self.computed_zorder:
442443
# Calculate projection of collections and patches and zorder
443444
# them. Make sure they are drawn above the grids.

0 commit comments

Comments
 (0)