8000 Fix mpl deprecations in examples. · matplotlib/matplotlib@3d59711 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3d59711

Browse files
committed
Fix mpl deprecations in examples.
svg.embed_char_paths -> svg.fonttype axisbg -> facecolor Skip 'spectral' colormap in a demo.
1 parent 486c489 commit 3d59711

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

examples/pylab_examples/demo_bboximage.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
a = np.vstack((a, a))
2727

2828
maps = sorted(m for m in plt.cm.cmap_d if not m.endswith("_r"))
29+
maps.remove('spectral') # Deprecated.
2930
#nmaps = len(maps) + 1
3031

3132
#fig.subplots_adjust(top=0.99, bottom=0.01, left=0.2, right=0.99)

examples/user_interfaces/svg_histogram.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
from io import BytesIO
3636
import json
3737

38-
plt.rcParams['svg.embed_char_paths'] = 'none'
38+
39+
plt.rcParams['svg.fonttype'] = 'none'
3940

4041
# Apparently, this `register_namespace` method works only with
4142
# python 2.7 and up and is necessary to avoid garbling the XML name

examples/widgets/span_selector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
ax.set_ylim(-2, 2)
1717
ax.set_title('Press left mouse button and drag to test')
1818

19-
ax2 = fig.add_subplot(212, axisbg='#FFFFCC')
19+
ax2 = fig.add_subplot(212, facecolor='#FFFFCC')
2020
line2, = ax2.plot(x, y, '-')
2121

2222

0 commit comments

Comments
 (0)
0