Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2d05981

Browse files
authored
Merge pull request #13380 from anntzer/scatter3d
Minor simplifications to scatter3d.
2 parents 32ecf08 + 6374f3a commit 2d05981

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2361,17 +2361,13 @@ def scatter(self, xs, ys, zs=0, zdir='z', s=20, c=None, depthshade=True,
23612361
xs, ys, zs, s, c = cbook.delete_masked_points(xs, ys, zs, s, c)
23622362

23632363
patches = super().scatter(xs, ys, s=s, c=c, *args, **kwargs)
2364-
is_2d = not np.iterable(zs)
2365-
zs = np.broadcast_to(zs, len(xs))
23662364
art3d.patch_collection_2d_to_3d(patches, zs=zs, zdir=zdir,
23672365
depthshade=depthshade)
23682366

23692367
if self._zmargin < 0.05 and xs.size > 0:
23702368
self.set_zmargin(0.05)
23712369

2372-
#FIXME: why is this necessary?
2373-
if not is_2d:
2374-
self.auto_scale_xyz(xs, ys, zs, had_data)
2370+
self.auto_scale_xyz(xs, ys, zs, had_data)
23752371

23762372
return patches
23772373

0 commit comments

Comments
 (0)