@@ -379,6 +379,42 @@ Example
379
379
ax.xaxis.set_tick_params(which='both', rotation=90)
380
380
381
381
382
+ Users can now toggle shading in 3D bar plots
383
+ --------------------------------------------
384
+
385
+ A new ``shade `` parameter has been added the 3D
386
+ `~mpl_toolkits.mplot3d.axes3d.Axes3D.bar ` plotting method. The default behavior
387
+ remains to shade the bars, but now users have the option of setting ``shade ``
388
+ to ``False ``.
389
+
390
+
391
+ Example
392
+ ~~~~~~~
393
+ .. plot ::
394
+ :include-source:
395
+ :align: center
396
+
397
+ import numpy as np
398
+ import matplotlib.pyplot as plt
399
+ from mpl_toolkits.mplot3d import Axes3D
400
+
401
+ x = np.arange(2)
402
+ y = np.arange(3)
403
+ x2d, y2d = np.meshgrid(x, y)
404
+ x, y = x2d.ravel(), y2d.ravel()
405
+ z = np.zeros_like(x)
406
+ dz = x + y
407
+
408
+ fig = plt.figure(figsize=(4, 6))
409
+ ax1 = fig.add_subplot(2, 1, 1, projection='3d')
410
+ ax1.bar3d(x, y, z, 1, 1, dz, shade=True)
411
+ ax1.set_title('Shading On')
412
+
413
+ ax2 = fig.add_subplot(2, 1, 2, projection='3d')
414
+ ax2.bar3d(x, y, z, 1, 1, dz, shade=False)
415
+ ax2.set_title('Shading Off')
416
+
417
+ plt.show()
382
418
Internals
383
419
+++++++++
384
420
@@ -442,43 +478,6 @@ Pending
442
478
+++++++
443
479
444
480
445
- Users can now toggle shading in 3D bar plots
446
- --------------------------------------------
447
-
448
- A new ``shade `` parameter has been added the 3D
449
- `~mpl_toolkits.mplot3d.axes3d.Axes3D.bar ` plotting method. The default behavior
450
- remains to shade the bars, but now users have the option of setting ``shade ``
451
- to ``False ``.
452
-
453
-
454
- Example
455
- ~~~~~~~
456
- .. plot ::
457
- :include-source:
458
- :align: center
459
-
460
- import numpy as np
461
- import matplotlib.pyplot as plt
462
- from mpl_toolkits.mplot3d import Axes3D
463
-
464
- x = np.arange(2)
465
- y = np.arange(3)
466
- x2d, y2d = np.meshgrid(x, y)
467
- x, y = x2d.ravel(), y2d.ravel()
468
- z = np.zeros_like(x)
469
- dz = x + y
470
-
471
- fig = plt.figure(figsize=(4, 6))
472
- ax1 = fig.add_subplot(2, 1, 1, projection='3d')
473
- ax1.bar3d(x, y, z, 1, 1, dz, shade=True)
474
- ax1.set_title('Shading On')
475
-
476
- ax2 = fig.add_subplot(2, 1, 2, projection='3d')
477
- ax2.bar3d(x, y, z, 1, 1, dz, shade=False)
478
- ax2.set_title('Shading Off')
479
-
480
- plt.show()
481
-
482
481
483
482
New which Parameter for autofmt_xdate
484
483
-------------------------------------
0 commit comments