Skip to content

Commit 72b75c9

Browse files
authored
Merge pull request #9259 from QuLogic/whatsnew-fixes
DOC: Several small What's New fixes
2 parents c8c76ad + 49c8219 commit 72b75c9

File tree

1 file changed

+92
-75
lines changed

1 file changed

+92
-75
lines changed

doc/users/whats_new.rst

+92-75
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,27 @@ The polar axes transforms have been greatly re-factored to allow for more
3131
customization of view limits and tick labelling. Additional options for view
3232
limits allow for creating an annulus, a sector, or some combination of the two.
3333

34-
The :meth:`~matplotlib.axes.projections.polar.PolarAxes.set_rorigin` method may
34+
The :meth:`~matplotlib.projections.polar.PolarAxes.set_rorigin` method may
3535
be used to provide an offset to the minimum plotting radius, producing an
3636
annulus.
3737

38-
The :meth:`~matplotlib.projections.polar.PolarAxes.set_theta_zero_location` now
39-
has an optional :code:`offset` argument. This argument may be used to further
40-
specify the zero location based on the given anchor point.
38+
The :meth:`~matplotlib.projections.polar.PolarAxes.set_theta_zero_location`
39+
method now has an optional :code:`offset` argument. This argument may be used
40+
to further specify the zero location based on the given anchor point.
4141

42-
.. figure:: ../gallery/pie_and_polar_charts/images/sphx_glr_polar_scatter_001.png
43-
:target: ../gallery/pie_and_polar_charts/polar_scatter.html
42+
.. figure:: /gallery/pie_and_polar_charts/images/sphx_glr_polar_scatter_002.png
43+
:target: ../gallery/pie_and_polar_charts/polar_scatter.html#scatter-plot-on-polar-axis-with-offset-origin
4444
:align: center
4545
:scale: 50
4646

4747
Polar Offset Demo
4848

49-
The :meth:`~matplotlib.axes.projections.polar.PolarAxes.set_thetamin` and
50-
:meth:`~matplotlib.axes.projections.polar.PolarAxes.set_thetamax` methods may
49+
The :meth:`~matplotlib.projections.polar.PolarAxes.set_thetamin` and
50+
:meth:`~matplotlib.projections.polar.PolarAxes.set_thetamax` methods may
5151
be used to limit the range of angles plotted, producing sectors of a circle.
5252

53-
.. figure:: ../gallery/pie_and_polar_charts/images/sphx_glr_polar_scatter_002.png
54-
:target: ../gallery/pie_and_polar_charts/polar_scatter.html
53+
.. figure:: /gallery/pie_and_polar_charts/images/sphx_glr_polar_scatter_003.png
54+
:target: ../gallery/pie_and_polar_charts/polar_scatter.html#scatter-plot-on-polar-axis-confined-to-a-sector
5555
:align: center
5656
:scale: 50
5757

@@ -77,12 +77,12 @@ Jake Vanderplas' JSAnimation package has been merged into matplotlib. This
7777
adds to matplotlib the `~matplotlib.animation.HTMLWriter` class for
7878
generating a javascript HTML animation, suitable for the IPython notebook.
7979
This can be activated by default by setting the ``animation.html`` rc
80-
parameter to ``jshtml``. One can also call the ``anim_to_jshtml`` function
81-
to manually convert an animation. This can be displayed using IPython's
82-
``HTML`` display class::
80+
parameter to ``jshtml``. One can also call the
81+
`~matplotlib.animation.Animation.to_jshtml` method to manually convert an
82+
animation. This can be displayed using IPython's ``HTML`` display class::
8383

8484
from IPython.display import HTML
85-
HTML(animation.anim_to_jshtml(anim))
85+
HTML(animation.to_jshtml())
8686

8787
The `~matplotlib.animation.HTMLWriter` class can also be used to generate
8888
an HTML file by asking for the ``html`` writer.
@@ -107,7 +107,10 @@ path.
107107
CheckButtons widget get_status function
108108
---------------------------------------
109109

110-
A :func:`get_status` function has been added the :class:`matplotlib.widgets.CheckButtons` class. This :func:`get_status` function allows user to query the status (True/False) of all of the buttons in the CheckButtons object.
110+
A :func:`~matplotlib.widgets.CheckButtons.get_status` method has been added the
111+
:class:`matplotlib.widgets.CheckButtons` class. This ``get_status`` method
112+
allows user to query the status (True/False) of all of the buttons in the
113+
``CheckButtons`` object.
111114

112115

113116
Abstract base class for movie writers
@@ -123,7 +126,7 @@ from the new abstract base class.
123126
Add fill_bar argument to ``AnchoredSizeBar``
124127
--------------------------------------------
125128

126-
The mpl_toolkits class
129+
The ``mpl_toolkits`` class
127130
:class:`~mpl_toolkits.axes_grid1.anchored_artists.AnchoredSizeBar` now has an
128131
additional ``fill_bar`` argument, which makes the size bar a solid rectangle
129132
instead of just drawing the border of the rectangle. The default is ``None``,
@@ -138,44 +141,50 @@ rectangle for the size bar.
138141
Annotation can use a default arrow style
139142
----------------------------------------
140143

141-
Annotations now use the default arrow style when setting `arrowprops={}`,
144+
Annotations now use the default arrow style when setting ``arrowprops={}``,
142145
rather than no arrow (the new behavior actually matches the documentation).
143146

144147

145148
Orthographic projection for mplot3d
146149
-----------------------------------
147-
:class:`~mpl_toolkits.mplot3d.axes3d.Axes3D` now accepts ``proj_type`` kwarg and has a method :meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.set_proj_type`. The default option is ``'persp'`` as before, and supplying ``'ortho'`` enables orthographic view.
150+
:class:`~mpl_toolkits.mplot3d.axes3d.Axes3D` now accepts ``proj_type`` keyword
151+
argument and has a method :meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.set_proj_type`.
152+
The default option is ``'persp'`` as before, and supplying ``'ortho'`` enables
153+
orthographic view.
148154

149155

150156
``voxels`` function for mplot3d
151157
-------------------------------
152-
:class:`~mpl_toolkits.mplot3d.axes3d.Axes3D` now has a ``voxels`` method, for
153-
visualizing boolean 3d data. Uses could include plotting a sparse 3D heat map,
154-
or visualizing a volumetric model.
158+
:class:`~mpl_toolkits.mplot3d.axes3d.Axes3D` now has a
159+
`~mpl_toolkits.mplot3d.axes3d.Axes3D.voxels` method, for visualizing boolean 3d
160+
data. Uses could include plotting a sparse 3D heat map, or visualizing a
161+
volumetric model.
155162

156163

157164
Barbs and Quiver Support Dates
158165
------------------------------
159166

160-
When using the :func:`quiver` and :func:`barbs` plotting methods,
161-
it is now possible to pass dates, just like for other methods like
162-
:func:`plot`. This also allows these functions to handle values
163-
that need unit-conversion applied.
167+
When using the :func:`~matplotlib.axes.Axes.quiver` and
168+
:func:`~matplotlib.axes.Axes.barbs` plotting methods, it is now possible to
169+
pass dates, just like for other methods like :func:`~matplotlib.axes.Axes.plot`.
170+
This also allows these functions to handle values that need unit-conversion
171+
applied.
164172

165173

166174
Hexbin default line color
167175
-------------------------
168176

169-
The default ``linecolor`` kwarg for :func:`hexbin` is now ``'face'``, and
170-
supplying ``'none'`` now prevents lines from being drawn around the hexagons.
177+
The default ``linecolor`` keyword argument for :func:`~matplotlib.axes.Axes.hexbin`
178+
is now ``'face'``, and supplying ``'none'`` now prevents lines from being drawn
179+
around the hexagons.
171180

172181

173-
figure.legend() can be called without arguments
182+
Figure.legend() can be called without arguments
174183
-----------------------------------------------
175184

176-
Calling :func:`figure.legend` can now be done with no arguments. In this case a
177-
legend will be created that contains all the artists on all the axes contained
178-
within the figure.
185+
Calling ``Figure.``:func:`~matplotlib.figure.Figure.legend` can now be
186+
done with no arguments. In this case a legend will be created that contains all
187+
the artists on all the axes contained within the figure.
179188

180189

181190
New parameter `clear` for :func:`~matplotlib.pyplot.figure`
@@ -213,22 +222,23 @@ from :func:`~matplotlib.pyplot.figure`, it can also be used there::
213222

214223
AVConv writer is back
215224
---------------------
216-
Correct a bug that prevented detection of AVconv for matplotlib.animation.
225+
Correct a bug that prevented detection of AVconv for `matplotlib.animation`.
217226

218227

219228
Invalid (Non-finite) Axis Limit Error
220229
-------------------------------------
221230

222-
When using :func:`set_xlim` and :func:`set_ylim`, passing non-finite values now
223-
results in a ValueError. The previous behavior resulted in the limits being
224-
erroneously reset to `(-0.001, 0.001)`.
231+
When using :func:`~matplotlib.axes.Axes.set_xlim` and
232+
:func:`~matplotlib.axes.Axes.set_ylim`, passing non-finite values now results
233+
in a ``ValueError``. The previous behavior resulted in the limits being
234+
erroneously reset to ``(-0.001, 0.001)``.
225235

226236

227-
Metadata savefig kwarg
228-
----------------------
237+
Metadata savefig keyword argument
238+
---------------------------------
229239

230-
:func:`~matplotlib.pyplot.savefig` now accepts `metadata` as a keyword argument.
231-
It can be used to store key/value pairs in the image metadata.
240+
:func:`~matplotlib.pyplot.savefig` now accepts ``metadata`` as a keyword
241+
argument. It can be used to store key/value pairs in the image metadata.
232242

233243
Supported formats and backends
234244
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -249,20 +259,20 @@ Example
249259
Specify minimum value to format as scalar for ``LogFormatterMathtext``
250260
----------------------------------------------------------------------
251261

252-
``LogFormatterMathtext`` now includes the option to specify a minimum value
253-
exponent to format as a scalar (ie. 0.001 instead of 10^-3).
262+
:class:`~matplotlib.ticker.LogFormatterMathtext` now includes the option to
263+
specify a minimum value exponent to format as a scalar (ie. 0.001 instead of 10^-3).
254264

255265

256266
Multiple legend keys for legend entries
257267
---------------------------------------
258268

259269
A legend entry can now contain more than one legend key. The extended
260-
``HandlerTuple`` class now accepts two parameters: ``ndivide`` divides the
261-
legend area in the specified number of sections; ``pad`` changes the padding
262-
between the legend keys.
270+
`~matplotlib.legend_handler.HandlerTuple` class now accepts two parameters:
271+
``ndivide`` divides the legend area in the specified number of sections;
272+
``pad`` changes the padding between the legend keys.
263273

264274
.. figure:: /gallery/text_labels_and_annotations/images/sphx_glr_legend_demo_004.png
265-
:target: ../../gallery/text_labels_and_annotations/legend_demo.html
275+
:target: ../gallery/text_labels_and_annotations/legend_demo.html
266276
:align: center
267277
:scale: 50
268278

@@ -278,7 +288,7 @@ notice better rendering performance when plotting large amounts of
278288
data (as long as the above parameters are set accordingly). Only the
279289
line segment portion of paths will be simplified -- if you are also
280290
drawing markers and experiencing problems with rendering speed, you
281-
should consider using the ``markevery`` option to ``plot``.
291+
should consider using the ``markevery`` option to `~matplotlib.axes.Axes.plot`.
282292
See the :ref:`performance` section in the usage tutorial for more
283293
information.
284294

@@ -298,16 +308,17 @@ values are unlikely to cause any visible differences in your plots.
298308
Added `matplotlib.ticker.PercentFormatter`
299309
------------------------------------------
300310

301-
The new formatter has some nice features like being able to convert from
302-
arbitrary data scales to percents, a customizable percent symbol and
303-
either automatic or manual control over the decimal points.
311+
The new `~matplotlib.ticker.PercentFormatter` formatter has some nice features
312+
like being able to convert from arbitrary data scales to percents, a
313+
customizable percent symbol and either automatic or manual control over the
314+
decimal points.
304315

305316

306-
New quiverkey angle kwarg
307-
-------------------------
317+
New quiverkey angle keyword argument
318+
------------------------------------
308319

309-
Plotting a :func:`quiverkey` now admits the ``angle`` kwarg,
310-
which sets the angle at which to draw the key arrow.
320+
Plotting a :func:`~matplotlib.axes.Axes.quiverkey` now admits the ``angle``
321+
keyword argument, which sets the angle at which to draw the key arrow.
311322

312323

313324
Reproducible PS, PDF and SVG output
@@ -352,16 +363,18 @@ reversed.
352363
`Collection` offsets are no longer implicitly flattened
353364
-------------------------------------------------------
354365

355-
`Collection` (and thus `scatter` -- both 2D and 3D) no longer implicitly
356-
flattens its offsets. As a consequence, `scatter`'s x and y arguments can no
357-
longer be 2+-dimensional arrays.
366+
`~matplotlib.collections.Collection` (and thus both 2D
367+
`~matplotlib.axes.Axes.scatter` and 3D
368+
`~mpl_toolkits.mplot3d.axes3d.Axes3D.scatter`) no
369+
longer implicitly flattens its offsets. As a consequence, ``scatter``'s ``x``
370+
and ``y`` arguments can no longer be 2+-dimensional arrays.
358371

359372

360373
`Artist.setp` (and `pyplot.setp`) accept a `file` argument
361374
----------------------------------------------------------
362375

363376
The argument is keyword-only. It allows an output file other than
364-
`sys.stdout` to be specified. It works exactly like the `file` argument
377+
`sys.stdout` to be specified. It works exactly like the ``file`` argument
365378
to `print`.
366379

367380

@@ -376,7 +389,8 @@ visibility of the flow pattern in some use cases.
376389
`Axis.set_tick_params` now responds to 'rotation'
377390
-------------------------------------------------
378391

379-
Bulk setting of tick label rotation is now possible via :func:`set_tick_params` using the `rotation` keyword.
392+
Bulk setting of tick label rotation is now possible via
393+
:func:`~matplotlib.axis.Axis.set_tick_params` using the ``rotation`` keyword.
380394

381395
Example
382396
~~~~~~~
@@ -387,9 +401,10 @@ Example
387401
Users can now toggle shading in 3D bar plots
388402
--------------------------------------------
389403

390-
A new ``shade`` parameter has been added the 3D bar plotting method.
391-
The default behavior remains to shade the bars, but now users
392-
have the option of setting ``shade`` to ``False``.
404+
A new ``shade`` parameter has been added the 3D
405+
`~mpl_toolkits.mplot3d.axes3d.Axes3D.bar` plotting method. The default behavior
406+
remains to shade the bars, but now users have the option of setting ``shade``
407+
to ``False``.
393408

394409

395410
Example
@@ -417,25 +432,26 @@ Example
417432
New which Parameter for autofmt_xdate
418433
-------------------------------------
419434

420-
A ``which`` parameter now exists for the method :func:`autofmt_xdate`. This
421-
allows a user to format ``major``, ``minor`` or ``both`` tick labels
422-
selectively. If ``which`` is ``None`` (default) then the method will rotate
423-
``major`` tick labels.
435+
A ``which`` parameter now exists for the method
436+
:func:`~matplotlib.figure.Figure.autofmt_xdate`. This allows a user to format
437+
``major``, ``minor`` or ``both`` tick labels selectively. If ``which`` is
438+
``None`` (default) then the method will rotate ``major`` tick labels.
424439

425440
Example
426441
~~~~~~~
427442
::
428443

429-
autofmt_xdate(self, bottom=0.2, rotation=30, ha='right', which='minor')
444+
fig.autofmt_xdate(bottom=0.2, rotation=30, ha='right', which='minor')
430445

431446

432447
New Figure Parameter for subplot2grid
433448
-------------------------------------
434449

435-
A ``fig`` parameter now exists for the method :func:`subplot2grid`. This allows
436-
a user to specify the figure where the subplots will be created. If ``fig``
437-
is ``None`` (default) then the method will use the current figure retrieved by
438-
:func:`gcf`.
450+
A ``fig`` parameter now exists for the function
451+
:func:`~matplotlib.pyplot.subplot2grid`. This allows a user to specify the
452+
figure where the subplots will be created. If ``fig`` is ``None`` (default)
453+
then the method will use the current figure retrieved by
454+
:func:`~matplotlib.pyplot.gcf`.
439455

440456
Example
441457
~~~~~~~
@@ -447,9 +463,10 @@ Example
447463
Interpolation in fill_betweenx
448464
------------------------------
449465

450-
The ``interpolate`` parameter now exists for the method :func:`fill_betweenx`.
451-
This allows a user to interpolate the data and fill the areas in the crossover
452-
points, similarly to :func:`fill_between`.
466+
The ``interpolate`` parameter now exists for the method
467+
:func:`~matplotlib.axes.Axes.fill_betweenx`. This allows a user to interpolate
468+
the data and fill the areas in the crossover points, similarly to
469+
:func:`~matplotlib.axes.Axes.fill_between`.
453470

454471

455472
Validation of line style rcParams
@@ -491,8 +508,8 @@ New keyword argument 'sep' for EngFormatter
491508
A new "sep" keyword argument has been added to
492509
:class:`~matplotlib.ticker.EngFormatter` and provides a means to define
493510
the string that will be used between the value and its unit. The default
494-
string is " ", which preserves the former behavior. Besides, the separator is
495-
now present between the value and its unit even in the absence of SI prefix.
511+
string is " ", which preserves the former behavior. Additionally, the separator
512+
is now present between the value and its unit even in the absence of SI prefix.
496513
There was formerly a bug that was causing strings like "3.14V" to be returned
497514
instead of the expected "3.14 V" (with the default behavior).
498515

0 commit comments

Comments
 (0)