Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9471870

Browse files
committed
DOC: Add more entries to 3.3 what's new.
1 parent fd7eb1d commit 9471870

1 file changed

Lines changed: 80 additions & 1 deletion

File tree

doc/users/prev_whats_new/whats_new_3.3.0.rst

Lines changed: 80 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,30 @@ as an alternative to ::
6262
fig.subplots(2, 2, gridspec_kw={"height_ratios": [3, 1]})
6363

6464

65+
New Turbo colormap
66+
------------------
67+
68+
Turbo is an improved rainbow colormap for visualization, created by the Google
69+
AI team for computer visualization and machine learning. Its purpose is to
70+
display depth and disparity data. Please see the `Google AI Blog
71+
<https://ai.googleblog.com/2019/08/turbo-improved-rainbow-colormap-for.html>`_
72+
for further details.
73+
74+
Below shows Turbo and some other rainbow-esque colormaps:
75+
76+
.. plot::
77+
78+
gradient = np.linspace(0, 1, 256)
79+
gradient = np.vstack((gradient, gradient))
80+
cmaps = ['turbo', 'jet', 'gist_rainbow_r', 'hsv_r']
81+
82+
fig, axs = plt.subplots(len(cmaps), constrained_layout=True)
83+
for name, ax in zip(cmaps, axs):
84+
ax.imshow(gradient, aspect='auto', cmap=plt.get_cmap(name))
85+
ax.set_title(name)
86+
ax.set_axis_off()
87+
88+
6589
New ``Axes.axline`` method
6690
--------------------------
6791

@@ -391,13 +415,33 @@ clabels has been changed to (``2 + zorder`` passed to `~.axes.Axes.contour` /
391415
`~.axes.Axes.contourf`).
392416

393417

418+
Better control of ``Axes.pie`` normalization
419+
--------------------------------------------
420+
421+
Previously, `.Axes.pie` would normalize its input *x* if ``sum(x) > 1``, but
422+
would do nothing if the sum were less than 1. This can be confusing, so an
423+
explicit keyword argument *normalize* has been added. By default, the old
424+
behavior is preserved.
425+
426+
By passing *normalize*, one can explicitly control whether any rescaling takes
427+
place and whether partial pies should be created.
428+
429+
394430
Simple syntax to select fonts by absolute path
395431
----------------------------------------------
396432

397433
Fonts can now be selected by passing an absolute `pathlib.Path` to the *font*
398434
keyword argument of `.Text`.
399435

400436

437+
Improved font weight detection
438+
------------------------------
439+
440+
Matplotlib is now better able to determine the weight of fonts from their
441+
metadata, allowing to differentiate between fonts within the same family more
442+
accurately.
443+
444+
401445
rcParams improvements
402446
---------------------
403447

@@ -453,7 +497,6 @@ value of `~.get_box_aspect`. To control these ratios use the
453497
`~mpl_toolkits.mplot3d.axes3d.Axes3D.set_box_aspect` method which accepts the
454498
ratios as a 3-tuple of X:Y:Z. The default aspect ratio is 4:4:3.
455499

456-
457500
3D axes now support minor ticks
458501
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
459502

@@ -483,6 +526,23 @@ Home/Forward/Backward buttons now work with 3D axes
483526
Interactive tool improvements
484527
-----------------------------
485528

529+
More consistent toolbar behavior across backends
530+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
531+
532+
Toolbar features are now more consistent across backends. The history buttons
533+
will auto-disable when there is no further action in a direction. The pan and
534+
zoom buttons will be marked active when they are in use.
535+
536+
In NbAgg and WebAgg, the toolbar buttons are now grouped similarly to other
537+
backends. The WebAgg toolbar now uses the same icons as other backends.
538+
539+
Toolbar icons are now styled for dark themes
540+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
541+
542+
On dark themes, toolbar icons will now be inverted. When using the GTK3Agg
543+
backend, toolbar icons are now symbolic, and both foreground and background
544+
colors will follow the theme. Tooltips should also behave correctly.
545+
486546
Cursor text now uses a number of significant digits matching pointing precision
487547
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
488548

@@ -551,6 +611,19 @@ The SVG backend now respects the hatch stroke alpha. Useful applications are,
551611
among others, semi-transparent hatches as a subtle way to differentiate columns
552612
in bar plots.
553613

614+
SVG supports URLs on more artists
615+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
616+
617+
URLs on more artists (i.e., from `.Artist.set_url`) will now be saved in
618+
SVG files, namely, ``Tick``\s and ``Line2D``\s are now supported.
619+
620+
Images in SVG will no longer be blurred in some viewers
621+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
622+
623+
A style is now supplied to images without interpolation (``imshow(...,
624+
interpolation='none'``) so that SVG image viewers will no longer perform
625+
interpolation when rendering themselves.
626+
554627
Saving SVG now supports adding metadata
555628
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
556629

@@ -569,3 +642,9 @@ interpreted in the same way as with the PDF backend. Previously, this metadata
569642
was only accepted by the PGF backend when saving a multi-page PDF with
570643
`.backend_pgf.PdfPages`, but is now allowed when saving a single figure, as
571644
well.
645+
646+
NbAgg and WebAgg no longer use jQuery & jQuery UI
647+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
648+
649+
Instead, they are implemented using vanilla JavaScript. Please report any
650+
issues with browsers.

0 commit comments

Comments
 (0)