Skip to content

Commit 8e535e6

Browse files
committed
DOC: add 3D bar shade blurb to what's new
1 parent ffab7c5 commit 8e535e6

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Users can now toggle shading in 3D bar plots
2+
--------------------------------------------
3+
4+
A new ``shade`` parameter has been added the 3D bar plotting method.
5+
The default behavior remains to shade the bars, but now users
6+
have the option of setting ``shade`` to ``False``.
7+
8+
9+
Example
10+
```````
11+
::
12+
13+
import numpy as np
14+
import matplotlib.pyplot as plt
15+
from mpl_toolkits.mplot3d import Axes3D
16+
17+
fig = plt.figure(figsize=(7,3))
18+
ax1 = fig.add_subplot(121, projection='3d')
19+
x = np.arange(2)
20+
y = np.arange(3)
21+
x2d, y2d = np.meshgrid(x, y)
22+
x2d, y2d = x2d.ravel(), y2d.ravel()
23+
z = x2d + y2d
24+
ax1.bar3d(x2d, y2d, x2d * 0, 1, 1, z, shade=True)
25+
26+
ax2 = fig.add_subplot(122, projection='3d')
27+
ax2.bar3d(x2d, y2d, x2d * 0, 1, 1, z, shade=False)
28+
fig.canvas.draw()

0 commit comments

Comments
 (0)