@@ -103,6 +103,42 @@ allows user to query the status (True/False) of all of the buttons in the
103103``CheckButtons `` object.
104104
105105
106+ Add ``fill_bar `` argument to ``AnchoredSizeBar ``
107+ ------------------------------------------------
108+
109+ The ``mpl_toolkits `` class
110+ :class: `~mpl_toolkits.axes_grid1.anchored_artists.AnchoredSizeBar ` now has an
111+ additional ``fill_bar `` argument, which makes the size bar a solid rectangle
112+ instead of just drawing the border of the rectangle. The default is ``None ``,
113+ and whether or not the bar will be filled by default depends on the value of
114+ ``size_vertical ``. If ``size_vertical `` is nonzero, ``fill_bar `` will be set to
115+ ``True ``. If ``size_vertical `` is zero then ``fill_bar `` will be set to
116+ ``False ``. If you wish to override this default behavior, set ``fill_bar `` to
117+ ``True `` or ``False `` to unconditionally always or never use a filled patch
118+ rectangle for the size bar.
119+
120+ Example
121+ ~~~~~~~
122+
123+ .. plot ::
124+ :include-source:
125+ :align: center
126+
127+ import matplotlib.pyplot as plt
128+ from mpl_toolkits.axes_grid1.anchored_artists import AnchoredSizeBar
129+
130+ fig, ax = plt.subplots(figsize=(3, 3))
131+
132+ bar0 = AnchoredSizeBar(ax.transData, 0.3, 'unfilled', loc=3, frameon=False,
133+ size_vertical=0.05, fill_bar=False)
134+ ax.add_artist(bar0)
135+ bar1 = AnchoredSizeBar(ax.transData, 0.3, 'filled', loc=4, frameon=False,
136+ size_vertical=0.05, fill_bar=True)
137+ ax.add_artist(bar1)
138+
139+ plt.show()
140+
141+
106142
107143Internals
108144+++++++++
@@ -137,41 +173,6 @@ abstract base class.
137173Pending
138174+++++++
139175
140- Add fill_bar argument to ``AnchoredSizeBar ``
141- --------------------------------------------
142-
143- The ``mpl_toolkits `` class
144- :class: `~mpl_toolkits.axes_grid1.anchored_artists.AnchoredSizeBar ` now has an
145- additional ``fill_bar `` argument, which makes the size bar a solid rectangle
146- instead of just drawing the border of the rectangle. The default is ``None ``,
147- and whether or not the bar will be filled by default depends on the value of
148- ``size_vertical ``. If ``size_vertical `` is nonzero, ``fill_bar `` will be set to
149- ``True ``. If ``size_vertical `` is zero then ``fill_bar `` will be set to
150- ``False ``. If you wish to override this default behavior, set ``fill_bar `` to
151- ``True `` or ``False `` to unconditionally always or never use a filled patch
152- rectangle for the size bar.
153-
154- Example
155- ~~~~~~~
156-
157- .. plot ::
158- :include-source:
159- :align: center
160-
161- import matplotlib.pyplot as plt
162- from mpl_toolkits.axes_grid1.anchored_artists import AnchoredSizeBar
163-
164- fig, ax = plt.subplots(figsize=(3, 3))
165-
166- bar0 = AnchoredSizeBar(ax.transData, 0.3, 'unfilled', loc=3, frameon=False,
167- size_vertical=0.05, fill_bar=False)
168- ax.add_artist(bar0)
169- bar1 = AnchoredSizeBar(ax.transData, 0.3, 'filled', loc=4, frameon=False,
170- size_vertical=0.05, fill_bar=True)
171- ax.add_artist(bar1)
172-
173- plt.show()
174-
175176
176177Annotation can use a default arrow style
177178----------------------------------------
0 commit comments