Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Several small What's New fixes#9259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tacaswell merged 5 commits intomatplotlib:v2.1.xfromQuLogic:whatsnew-fixes
Oct 2, 2017
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
167 changes: 92 additions & 75 deletionsdoc/users/whats_new.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,27 +31,27 @@ The polar axes transforms have been greatly re-factored to allow for more
customization of view limits and tick labelling. Additional options for view
limits allow for creating an annulus, a sector, or some combination of the two.

The :meth:`~matplotlib.axes.projections.polar.PolarAxes.set_rorigin` method may
The :meth:`~matplotlib.projections.polar.PolarAxes.set_rorigin` method may
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think you can get away (here and below) with omitting the :meth: because the current default role is :py:obj:.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Quite likely; I was a bit lazy and didn't change the existing ones, but generally didn't use any roles when adding the new links. There might be a slight difference with adding() for:func: and:meth:, though?

Copy link
Contributor

@anntzeranntzerOct 2, 2017
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

http://www.sphinx-doc.org/en/stable/domains.html#role-py:func
http://www.sphinx-doc.org/en/stable/config.html#confval-add_function_parentheses

Not sure whether it is set in conf.py right now, or whether py:obj respecsts that setting. If it doesn't we can just set add_function_parentheses to False.

Of course it's fine if you decide you don't want to mess with the markup, this is already an improvement...

EDIT:sphinx-doc/sphinx#171 suggests :py:obj: respects add_function_parentheses.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

When I tried the two options you gave below, the one with the:meth: role has parentheses while the one without doesn't.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Probably worth reporting as a Sphinx bug then?

be used to provide an offset to the minimum plotting radius, producing an
annulus.

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

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

Polar Offset Demo

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

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

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

from IPython.display import HTML
HTML(animation.anim_to_jshtml(anim))
HTML(animation.to_jshtml())

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

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.
A :func:`~matplotlib.widgets.CheckButtons.get_status` method has been added the
:class:`matplotlib.widgets.CheckButtons` class. This ``get_status`` method
allows user to query the status (True/False) of all of the buttons in the
``CheckButtons`` object.


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

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

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


Orthographic projection for mplot3d
-----------------------------------
: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.
:class:`~mpl_toolkits.mplot3d.axes3d.Axes3D` now accepts ``proj_type`` keyword
argument 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.


``voxels`` function for mplot3d
-------------------------------
:class:`~mpl_toolkits.mplot3d.axes3d.Axes3D` now has a ``voxels`` method, for
visualizing boolean 3d data. Uses could include plotting a sparse 3D heat map,
or visualizing a volumetric model.
:class:`~mpl_toolkits.mplot3d.axes3d.Axes3D` now has a
`~mpl_toolkits.mplot3d.axes3d.Axes3D.voxels` method, for visualizing boolean 3d
data. Uses could include plotting a sparse 3D heat map, or visualizing a
volumetric model.


Barbs and Quiver Support Dates
------------------------------

When using the :func:`quiver` and :func:`barbs` plotting methods,
it is now possible to pass dates, just like for other methods like
:func:`plot`. This also allows these functions to handle values
that need unit-conversion applied.
When using the :func:`~matplotlib.axes.Axes.quiver` and
:func:`~matplotlib.axes.Axes.barbs` plotting methods, it is now possible to
pass dates, just like for other methods like :func:`~matplotlib.axes.Axes.plot`.
This also allows these functions to handle values that need unit-conversion
applied.


Hexbin default line color
-------------------------

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


figure.legend() can be called without arguments
Figure.legend() can be called without arguments
-----------------------------------------------

Calling :func:`figure.legend` can now be done with no arguments. In this case a
legend will be created that contains all the artists on all the axes contained
within the figure.
Calling``Figure.``:func:`~matplotlib.figure.Figure.legend` can now be
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Does

`.Figure.legend`

or

:meth:`.Figure.legend`

work?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Ah, I wasn't sure if we could use the leading dot, but it does work in this case.

done with no arguments. In this case a legend will be created that contains all
the artists on all the axes containedwithin the figure.


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

AVConv writer is back
---------------------
Correct a bug that prevented detection of AVconv for matplotlib.animation.
Correct a bug that prevented detection of AVconv for`matplotlib.animation`.


Invalid (Non-finite) Axis Limit Error
-------------------------------------

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


Metadata savefigkwarg
----------------------
Metadata savefigkeyword argument
---------------------------------

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

Supported formats and backends
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All@@ -249,20 +259,20 @@ Example
Specify minimum value to format as scalar for ``LogFormatterMathtext``
----------------------------------------------------------------------

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


Multiple legend keys for legend entries
---------------------------------------

A legend entry can now contain more than one legend key. The extended
``HandlerTuple`` class now accepts two parameters: ``ndivide`` divides the
legend area in the specified number of sections; ``pad`` changes the padding
between the legend keys.
`~matplotlib.legend_handler.HandlerTuple` class now accepts two parameters:
``ndivide`` divides thelegend area in the specified number of sections;
``pad`` changes the paddingbetween the legend keys.

.. figure:: /gallery/text_labels_and_annotations/images/sphx_glr_legend_demo_004.png
:target: ../../gallery/text_labels_and_annotations/legend_demo.html
:target: ../gallery/text_labels_and_annotations/legend_demo.html
:align: center
:scale: 50

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

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

The new formatter has some nice features like being able to convert from
arbitrary data scales to percents, a customizable percent symbol and
either automatic or manual control over the decimal points.
The new `~matplotlib.ticker.PercentFormatter` formatter has some nice features
like being able to convert from arbitrary data scales to percents, a
customizable percent symbol and either automatic or manual control over the
decimal points.


New quiverkey anglekwarg
-------------------------
New quiverkey anglekeyword argument
------------------------------------

Plotting a :func:`quiverkey` now admits the ``angle`` kwarg,
which sets the angle at which to draw the key arrow.
Plotting a :func:`~matplotlib.axes.Axes.quiverkey` now admits the ``angle``
keyword argument,which sets the angle at which to draw the key arrow.


Reproducible PS, PDF and SVG output
Expand DownExpand Up@@ -352,16 +363,18 @@ reversed.
`Collection` offsets are no longer implicitly flattened
-------------------------------------------------------

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


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

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


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

Bulk setting of tick label rotation is now possible via :func:`set_tick_params` using the `rotation` keyword.
Bulk setting of tick label rotation is now possible via
:func:`~matplotlib.axis.Axis.set_tick_params` using the ``rotation`` keyword.

Example
~~~~~~~
Expand All@@ -387,9 +401,10 @@ Example
Users can now toggle shading in 3D bar plots
--------------------------------------------

A new ``shade`` parameter has been added the 3D bar plotting method.
The default behavior remains to shade the bars, but now users
have the option of setting ``shade`` to ``False``.
A new ``shade`` parameter has been added the 3D
`~mpl_toolkits.mplot3d.axes3d.Axes3D.bar` plotting method. The default behavior
remains to shade the bars, but now users have the option of setting ``shade``
to ``False``.


Example
Expand DownExpand Up@@ -417,25 +432,26 @@ Example
New which Parameter for autofmt_xdate
-------------------------------------

A ``which`` parameter now exists for the method :func:`autofmt_xdate`. This
allows a user to format ``major``, ``minor`` or ``both`` tick labels
selectively. If ``which``is ``None``(default) then the method will rotate
``major`` tick labels.
A ``which`` parameter now exists for the method
:func:`~matplotlib.figure.Figure.autofmt_xdate`. Thisallows a user to format
``major``, ``minor``or ``both``tick labels selectively. If ``which`` is
``None`` (default) then the method will rotate ``major`` tick labels.

Example
~~~~~~~
::

autofmt_xdate(self,bottom=0.2, rotation=30, ha='right', which='minor')
fig.autofmt_xdate(bottom=0.2, rotation=30, ha='right', which='minor')


New Figure Parameter for subplot2grid
-------------------------------------

A ``fig`` parameter now exists for the method :func:`subplot2grid`. This allows
a user to specify the figure where the subplots will be created. If ``fig``
is ``None`` (default) then the method will use the current figure retrieved by
:func:`gcf`.
A ``fig`` parameter now exists for the function
:func:`~matplotlib.pyplot.subplot2grid`. This allows a user to specify the
figure where the subplots will be created. If ``fig`` is ``None`` (default)
then the method will use the current figure retrieved by
:func:`~matplotlib.pyplot.gcf`.

Example
~~~~~~~
Expand All@@ -447,9 +463,10 @@ Example
Interpolation in fill_betweenx
------------------------------

The ``interpolate`` parameter now exists for the method :func:`fill_betweenx`.
This allows a user to interpolate the data and fill the areas in the crossover
points, similarly to :func:`fill_between`.
The ``interpolate`` parameter now exists for the method
:func:`~matplotlib.axes.Axes.fill_betweenx`. This allows a user to interpolate
the data and fill the areas in the crossover points, similarly to
:func:`~matplotlib.axes.Axes.fill_between`.


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

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp