Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
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
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
72d5b0c
b6b4138
2b789a2
d2d3626
49c8219
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.projections.polar.PolarAxes.set_rorigin` method may | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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:. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. http://www.sphinx-doc.org/en/stable/domains.html#role-py:func 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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` | ||
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_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.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_003.png | ||
:target: ../gallery/pie_and_polar_charts/polar_scatter.html#scatter-plot-on-polar-axis-confined-to-a-sector | ||
:align: center | ||
:scale: 50 | ||
@@ -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 | ||
`~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.to_jshtml()) | ||
The `~matplotlib.animation.HTMLWriter` class can also be used to generate | ||
an HTML file by asking for the ``html`` writer. | ||
@@ -107,7 +107,10 @@ path. | ||
CheckButtons widget get_status function | ||
--------------------------------------- | ||
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 | ||
@@ -123,7 +126,7 @@ from the new abstract base class. | ||
Add fill_bar argument to ``AnchoredSizeBar`` | ||
-------------------------------------------- | ||
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``, | ||
@@ -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={}``, | ||
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`` 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 | ||
`~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:`~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`` 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 | ||
----------------------------------------------- | ||
Calling``Figure.``:func:`~matplotlib.figure.Figure.legend` can now be | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Does
or
work? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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` | ||
@@ -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`. | ||
Invalid (Non-finite) Axis Limit Error | ||
------------------------------------- | ||
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 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. | ||
Supported formats and backends | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
@@ -249,20 +259,20 @@ Example | ||
Specify minimum value to format as scalar for ``LogFormatterMathtext`` | ||
---------------------------------------------------------------------- | ||
: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 | ||
`~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 | ||
:align: center | ||
:scale: 50 | ||
@@ -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 `~matplotlib.axes.Axes.plot`. | ||
See the :ref:`performance` section in the usage tutorial for more | ||
information. | ||
@@ -298,16 +308,17 @@ values are unlikely to cause any visible differences in your plots. | ||
Added `matplotlib.ticker.PercentFormatter` | ||
------------------------------------------ | ||
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 anglekeyword argument | ||
------------------------------------ | ||
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 | ||
@@ -352,16 +363,18 @@ reversed. | ||
`Collection` offsets are no longer implicitly flattened | ||
------------------------------------------------------- | ||
`~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 | ||
to `print`. | ||
@@ -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:`~matplotlib.axis.Axis.set_tick_params` using the ``rotation`` keyword. | ||
Example | ||
~~~~~~~ | ||
@@ -387,9 +401,10 @@ Example | ||
Users can now toggle shading in 3D bar plots | ||
-------------------------------------------- | ||
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 | ||
@@ -417,25 +432,26 @@ Example | ||
New which Parameter for autofmt_xdate | ||
------------------------------------- | ||
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 | ||
~~~~~~~ | ||
:: | ||
fig.autofmt_xdate(bottom=0.2, rotation=30, ha='right', which='minor') | ||
New Figure Parameter for subplot2grid | ||
------------------------------------- | ||
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 | ||
~~~~~~~ | ||
@@ -447,9 +463,10 @@ Example | ||
Interpolation in fill_betweenx | ||
------------------------------ | ||
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 | ||
@@ -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.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). | ||