@@ -23,7 +23,7 @@ submitted patches
23
23
.. _legend-refactor :
24
24
25
25
Legend enhancements
26
- --------------------
26
+ -------------------
27
27
28
28
Jae-Joon has rewritten the legend class, and added support for
29
29
multiple columns and rows, as well as fancy box drawing. See
@@ -40,7 +40,7 @@ multiple columns and rows, as well as fancy box drawing. See
40
40
.. _fancy-annotations :
41
41
42
42
Fancy annotations and arrows
43
- -----------------------------
43
+ ----------------------------
44
44
45
45
Jae-Joon has added lots of support to annotations for drawing fancy
46
46
boxes and connectors in annotations. See
@@ -49,18 +49,66 @@ boxes and connectors in annotations. See
49
49
:class: `~matplotlib.patches.ArrowStyle `, and
50
50
:class: `~matplotlib.patches.ConnectionStyle `.
51
51
52
- .. figure :: ../../gallery/pyplots/images/sphx_glr_whats_new_98_4_fancy_001.png
53
- :target: ../../gallery/pyplots/whats_new_98_4_fancy.html
54
- :align: center
55
- :scale: 50
52
+ .. plot ::
56
53
57
- Whats New 98 4 Fancy
54
+ import matplotlib.patches as mpatch
55
+ import matplotlib.pyplot as plt
58
56
59
- .. _psd-amplitude :
57
+ figheight = 4
58
+ fig = plt.figure(figsize=(4.5, figheight), dpi=80)
59
+ fontsize = 0.2 * fig.dpi
60
+
61
+ def make_boxstyles(ax):
62
+ styles = mpatch.BoxStyle.get_styles()
63
+
64
+ for i, (stylename, styleclass) in enumerate(sorted(styles.items())):
65
+ ax.text(0.5, (float(len(styles)) - 0.5 - i)/len(styles), stylename,
66
+ ha="center",
67
+ size=fontsize,
68
+ transform=ax.transAxes,
69
+ bbox=dict(boxstyle=stylename, fc="w", ec="k"))
70
+
71
+ def make_arrowstyles(ax):
72
+ styles = mpatch.ArrowStyle.get_styles()
73
+
74
+ ax.set_xlim(0, 4)
75
+ ax.set_ylim(0, figheight*2)
76
+
77
+ for i, (stylename, styleclass) in enumerate(sorted(styles.items())):
78
+ y = (float(len(styles)) - 0.25 - i) # /figheight
79
+ p = mpatch.Circle((3.2, y), 0.2, fc="w")
80
+ ax.add_patch(p)
81
+
82
+ ax.annotate(stylename, (3.2, y),
83
+ (2., y),
84
+ # xycoords="figure fraction", textcoords="figure fraction",
85
+ ha="right", va="center",
86
+ size=fontsize,
87
+ arrowprops=dict(arrowstyle=stylename,
88
+ patchB=p,
89
+ shrinkA=5,
90
+ shrinkB=5,
91
+ fc="w", ec="k",
92
+ connectionstyle="arc3,rad=-0.05",
93
+ ),
94
+ bbox=dict(boxstyle="square", fc="w"))
95
+
96
+ ax.xaxis.set_visible(False)
97
+ ax.yaxis.set_visible(False)
98
+
99
+
100
+ ax1 = fig.add_subplot(121, frameon=False, xticks=[], yticks=[])
101
+ make_boxstyles(ax1)
102
+
103
+ ax2 = fig.add_subplot(122, frameon=False, xticks=[], yticks=[])
104
+ make_arrowstyles(ax2)
105
+
106
+
107
+ plt.show()
60
108
61
109
62
110
Native OS X backend
63
- --------------------
111
+ -------------------
64
112
65
113
Michiel de Hoon has provided a native Mac OSX backend that is almost
66
114
completely implemented in C. The backend can therefore use Quartz
@@ -74,8 +122,11 @@ matplotlibrc file, or run your script with::
74
122
75
123
> python myfile.py -dmacosx
76
124
125
+
126
+ .. _psd-amplitude :
127
+
77
128
psd amplitude scaling
78
- -------------------------
129
+ ---------------------
79
130
80
131
Ryan May did a lot of work to rationalize the amplitude scaling of
81
132
:func: `~matplotlib.pyplot.psd ` and friends. See
@@ -86,7 +137,7 @@ compatibility and increase scaling options.
86
137
.. _fill-between :
87
138
88
139
Fill between
89
- ------------------
140
+ ------------
90
141
91
142
Added a :func: `~matplotlib.pyplot.fill_between ` function to make it
92
143
easier to do shaded region plots in the presence of masked data. You
@@ -102,7 +153,7 @@ where you want to do the filling.
102
153
Whats New 98 4 Fill Between
103
154
104
155
Lots more
105
- -----------
156
+ ---------
106
157
107
158
Here are the 0.98.4 notes from the CHANGELOG::
108
159
0 commit comments