Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8c6a52a

Browse filesBrowse files
committed
BUG: Fix face orientations of bar3d
Fixes #12138, which is caused by these incorrect orientations
1 parent bf67071 commit 8c6a52a
Copy full SHA for 8c6a52a

File tree

Expand file treeCollapse file tree

3 files changed

+8
-6
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+8
-6
lines changed

‎lib/mpl_toolkits/mplot3d/axes3d.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/mplot3d/axes3d.py
+8-6Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2433,13 +2433,15 @@ def bar3d(self, x, y, z, dx, dy, dz, color=None,
24332433
maxz = np.max(z + dz)
24342434

24352435
# shape (6, 4, 3)
2436+
# All faces are oriented facing outwards - when viewed from the
2437+
# outside, their vertices are in a counterclockwise ordering.
24362438
cuboid = np.array([
24372439
# -z
24382440
(
24392441
(0, 0, 0),
2440-
(1, 0, 0),
2441-
(1, 1, 0),
24422442
(0, 1, 0),
2443+
(1, 1, 0),
2444+
(1, 0, 0),
24432445
),
24442446
# +z
24452447
(
@@ -2458,16 +2460,16 @@ def bar3d(self, x, y, z, dx, dy, dz, color=None,
24582460
# +y
24592461
(
24602462
(0, 1, 0),
2461-
(1, 1, 0),
2462-
(1, 1, 1),
24632463
(0, 1, 1),
2464+
(1, 1, 1),
2465+
(1, 1, 0),
24642466
),
24652467
# -x
24662468
(
24672469
(0, 0, 0),
2468-
(0, 1, 0),
2469-
(0, 1, 1),
24702470
(0, 0, 1),
2471+
(0, 1, 1),
2472+
(0, 1, 0),
24712473
),
24722474
# +x
24732475
(
Loading
Loading

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.