@@ -23,7 +23,7 @@ submitted patches
2323.. _legend-refactor :
2424
2525Legend enhancements
26- --------------------
26+ -------------------
2727
2828Jae-Joon has rewritten the legend class, and added support for
2929multiple 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
4040.. _fancy-annotations :
4141
4242Fancy annotations and arrows
43- -----------------------------
43+ ----------------------------
4444
4545Jae-Joon has added lots of support to annotations for drawing fancy
4646boxes and connectors in annotations. See
@@ -49,18 +49,66 @@ boxes and connectors in annotations. See
4949:class: `~matplotlib.patches.ArrowStyle `, and
5050:class: `~matplotlib.patches.ConnectionStyle `.
5151
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 ::
5653
57- Whats New 98 4 Fancy
54+ import matplotlib.patches as mpatch
55+ import matplotlib.pyplot as plt
5856
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()
60108
61109
62110Native OS X backend
63- --------------------
111+ -------------------
64112
65113Michiel de Hoon has provided a native Mac OSX backend that is almost
66114completely implemented in C. The backend can therefore use Quartz
@@ -74,8 +122,11 @@ matplotlibrc file, or run your script with::
74122
75123 > python myfile.py -dmacosx
76124
125+
126+ .. _psd-amplitude :
127+
77128psd amplitude scaling
78- -------------------------
129+ ---------------------
79130
80131Ryan May did a lot of work to rationalize the amplitude scaling of
81132:func: `~matplotlib.pyplot.psd ` and friends. See
@@ -86,7 +137,7 @@ compatibility and increase scaling options.
86137.. _fill-between :
87138
88139Fill between
89- ------------------
140+ ------------
90141
91142Added a :func: `~matplotlib.pyplot.fill_between ` function to make it
92143easier to do shaded region plots in the presence of masked data. You
@@ -102,7 +153,7 @@ where you want to do the filling.
102153 Whats New 98 4 Fill Between
103154
104155Lots more
105- -----------
156+ ---------
106157
107158Here are the 0.98.4 notes from the CHANGELOG::
108159
0 commit comments