8000 Merge branch 'v3.3.0-doc' into v3.3.x · matplotlib/matplotlib@4d189e5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4d189e5

Browse files
committed
Merge branch 'v3.3.0-doc' into v3.3.x
2 parents 3a30505 + 4c6689c commit 4d189e5

File tree

24 files changed

+125
-34
lines changed

24 files changed

+125
-34
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ examples/*/*.svgz
7979
examples/tests/*
8080
!examples/tests/backend_driver_sgskip.py
8181
result_images
82+
doc/_static/constrained_layout*.png
8283

8384
# Nose/Pytest generated files #
8485
###############################
-37.6 KB
Binary file not shown.
-10.3 KB
Binary file not shown.
-10.3 KB
Binary file not shown.

doc/_static/figpager.png

49.6 KB
Loading

doc/_static/zenodo_cache/3898017.svg

Lines changed: 35 additions & 0 deletions
Loading

doc/_static/zenodo_cache/3948793.svg

Lines changed: 35 additions & 0 deletions
Loading

doc/api/prev_api_changes/api_changes_3.1.0.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,11 @@ The following miscellaneous API elements have been removed
531531

532532
import logging
533533
logger = logging.getLogger('matplotlib')
534-
logger.set_level(logging.INFO)
534+
logger.setLevel(logging.INFO)
535+
# configure log handling: Either include it into your ``logging`` hierarchy,
536+
# e.g. by configuring a root looger using ``logging.basicConfig()``,
537+
# or add a standalone handler to the matplotlib logger:
538+
logger.addHandler(logging.StreamHandler())
535539

536540
- ``__version__numpy__``
537541
- ``collections.CIRCLE_AREA_FACTOR``

doc/citing.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,12 @@ By version
3939
.. START OF AUTOGENERATED
4040
4141
42+
v3.3.0
43+
.. image:: _static/zenodo_cache/3948793.svg
44+
:target: https://doi.org/10.5281/zenodo.3948793
4245
v3.2.2
43-
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3898017.svg
44-
:target: https://doi.org/10.5281/zenodo.3898017
46+
.. image:: _static/zenodo_cache/3898017.svg
47+
:target: https://doi.org/10.5281/zenodo.3898017
4548
v3.2.1
4649
.. image:: _static/zenodo_cache/3714460.svg
4750
:target: https://doi.org/10.5281/zenodo.3714460

doc/thirdpartypackages/index.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,14 @@ border, and logo.
282282
.. image:: /_static/mpl_template_example.png
283283
:height: 330px
284284

285+
figpager
286+
========
287+
`figpager <https://pypi.org/project/figpager/>`_ provides customizable figure
288+
elements such as text, lines and images and subplot layout control for single
289+
or multi page output.
290+
291+
.. image:: /_static/figpager.png
292+
285293
blume
286294
=====
287295

doc/users/github_stats.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ GitHub stats for 2020/03/03 - 2020/07/16 (tag: v3.2.0)
77

88
These lists are automatically generated, and may be incomplete or contain duplicates.
99

10-
We closed 196 issues and merged 1066 pull requests.
10+
We closed 198 issues and merged 1066 pull requests.
1111
The full list can be seen `on GitHub <https://github.com/matplotlib/matplotlib/milestone/48?closed=1>`__
1212

13-
The following 144 authors contributed 3826 commits.
13+
The following 144 authors contributed 3829 commits.
1414

1515
* Adam
1616
* Adam Paszke
@@ -1228,8 +1228,10 @@ Pull Requests (1066):
12281228
* :ghpull:`15175`: Simplify pdf image output.
12291229
* :ghpull:`7506`: [WIP] Add Axes method for drawing infinite lines.
12301230

1231-
Issues (196):
1231+
Issues (198):
12321232

1233+
* :ghissue:`16501`: Setting a thetalim > 2pi gives odd results
1234+
* :ghissue:`15035`: security exposure in the packaged jquery library
12331235
* :ghissue:`10375`: Coordinate text wrapping in navigation toolbar
12341236
* :ghissue:`10720`: Option to set the text color in legend to be same as the line
12351237
* :ghissue:`17868`: plt.bar with nan input fails rendering in notebook using 3.3.0rc1

doc/users/prev_whats_new/whats_new_3.3.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ Turbo colormap
153153
--------------
154154

155155
Turbo is an improved rainbow colormap for visualization, created by the Google
156-
AI team for computer visualization and machine learning. Its purpose is to
156+
AI team for computer vision and machine learning. Its purpose is to
157157
display depth and disparity data. Please see the `Google AI Blog
158158
<https://ai.googleblog.com/2019/08/turbo-improved-rainbow-colormap-for.html>`_
159159
for further details.

examples/axisartist/axis_direction_demo_step01.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def setup_axes(fig, rect):
2525

2626
fig = plt.figure(figsize=(3, 2.5))
2727
fig.subplots_adjust(top=0.8)
28-
ax1 = setup_axes(fig, "111")
28+
ax1 = setup_axes(fig, 111)
2929

3030
ax1.axis["x"].set_axis_direction("left")
3131

examples/axisartist/axis_direction_demo_step02.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ def setup_axes(fig, rect):
2828
fig = plt.figure(figsize=(6, 2.5))
2929
fig.subplots_adjust(bottom=0.2, top=0.8)
3030

31-
ax1 = setup_axes(fig, "121")
31+
ax1 = setup_axes(fig, 121)
3232
ax1.axis["x"].set_ticklabel_direction("+")
3333
ax1.annotate("ticklabel direction=$+$", (0.5, 0), xycoords="axes fraction",
3434
xytext=(0, -10), textcoords 93C6 ="offset points",
3535
va="top", ha="center")
3636

37-
ax2 = setup_axes(fig, "122")
37+
ax2 = setup_axes(fig, 122)
3838
ax2.axis["x"].set_ticklabel_direction("-")
3939
ax2.annotate("ticklabel direction=$-$", (0.5, 0), xycoords="axes fraction",
4040
xytext=(0, -10), textcoords="offset points",

examples/axisartist/axis_direction_demo_step03.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ def setup_axes(fig, rect):
2828
fig = plt.figure(figsize=(6, 2.5))
2929
fig.subplots_adjust(bottom=0.2, top=0.8)
3030

31-
ax1 = setup_axes(fig, "121")
31+
ax1 = setup_axes(fig, 121)
3232
ax1.axis["x"].label.set_text("Label")
3333
ax1.axis["x"].toggle(ticklabels=False)
3434
ax1.axis["x"].set_axislabel_direction("+")
3535
ax1.annotate("label direction=$+$", (0.5, 0), xycoords="axes fraction",
3636
xytext=(0, -10), textcoords="offset points",
3737
va="top", ha="center")
3838

39-
ax2 = setup_axes(fig, "122")
39+
ax2 = setup_axes(fig, 122)
4040
ax2.axis["x"].label.set_text("Label")
4141
ax2.axis["x"].toggle(ticklabels=False)
4242
ax2.axis["x"].set_axislabel_direction("-")

examples/axisartist/axis_direction_demo_step04.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def setup_axes(fig, rect):
2929
fig = plt.figure(figsize=(6, 2.5))
3030
fig.subplots_adjust(bottom=0.2, top=0.8)
3131

32-
ax1 = setup_axes(fig, "121")
32+
ax1 = setup_axes(fig, 121)
3333
ax1.axis["x1"].label.set_text("rotation=0")
3434
ax1.axis["x1"].toggle(ticklabels=False)
3535

@@ -41,7 +41,7 @@ def setup_axes(fig, rect):
4141
xytext=(0, -10), textcoords="offset points",
4242
va="top", ha="center")
4343

44-
ax2 = setup_axes(fig, "122")
44+
ax2 = setup_axes(fig, 122)
4545

4646
ax2.axis["x1"].set_axislabel_direction("-")
4747
ax2.axis["x2"].set_axislabel_direction("-")

examples/axisartist/simple_axis_direction01.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import mpl_toolkits.axisartist as axisartist
99

1010
fig = plt.figure(figsize=(4, 2.5))
11-
ax1 = fig.add_subplot(axisartist.Subplot(fig, "111"))
11+
ax1 = fig.add_subplot(axisartist.Subplot(fig, 111))
1212
fig.subplots_adjust(right=0.8)
1313

1414
ax1.axis["left"].major_ticklabels.set_axis_direction("top")

examples/axisartist/simple_axis_direction03.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ def setup_axes(fig, rect):
2222
fig = plt.figure(figsize=(5, 2))
2323
fig.subplots_adjust(wspace=0.4, bottom=0.3)
2424

25-
ax1 = setup_axes(fig, "121")
25+
ax1 = setup_axes(fig, 121)
2626
ax1.set_xlabel("X-label")
2727
ax1.set_ylabel("Y-label")
2828

2929
ax1.axis[:].invert_ticklabel_direction()
3030

31-
ax2 = setup_axes(fig, "122")
31+
ax2 = setup_axes(fig, 122)
3232
ax2.set_xlabel("X-label")
3333
ax2.set_ylabel("Y-label")
3434

lib/matplotlib/axes/_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4597,7 +4597,7 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
45974597
`~matplotlib.collections.PolyCollection`
45984598
A `.PolyCollection` defining the hexagonal bins.
45994599
4600-
- `.PolyCollection.get_offset` contains a Mx2 array containing
4600+
- `.PolyCollection.get_offsets` contains a Mx2 array containing
46014601
the x, y positions of the M hexagon centers.
46024602
- `.PolyCollection.get_array` contains the values of the M
46034603
hexagons.

lib/matplotlib/figure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2618,7 +2618,7 @@ def tight_layout(self, renderer=None, pad=1.08, h_pad=None, w_pad=None,
26182618

26192619
def align_xlabels(self, axs=None):
26202620
"""
2621-
Align the ylabels of subplots in the same subplot column if label
2621+
Align the xlabels of subplots in the same subplot column if label
26222622
alignment is being done automatically (i.e. the label position is
26232623
not manually set).
26242624

lib/mpl_toolkits/mplot3d/art3d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ def __init__(self, verts, *args, zsort='average', **kwargs):
578578
Parameters
579579
----------
580580
verts : list of array-like Nx3
581-
Each element describes a polygon as a sequnce of ``N_i`` points
581+
Each element describes a polygon as a sequence of ``N_i`` points
582582
``(x, y, z)``.
583583
zsort : {'average', 'min', 'max'}, default: 'average'
584584
The calculation method for the z-order.

tools/cache_zenodo_svg.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ def _get_xdg_cache_dir():
6262

6363
if __name__ == "__main__":
6464
data = {
65+
"v3.3.0": "3948793",
66+
"v3.2.2": "3898017",
6567
"v3.2.1": "3714460",
6668
"v3.2.0": "3695547",
6769
"v3.1.3": "3633844",

tutorials/intermediate/constrainedlayout_guide.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,13 @@ def example_plot(ax, fontsize=12, hide_labels=False):
229229
leg.set_in_layout(True)
230230
# we don't want the layout to change at this point.
231231
fig.set_constrained_layout(False)
232-
fig.savefig('CL01.png', bbox_inches='tight', dpi=100)
232+
fig.savefig('../../doc/_static/constrained_layout_1b.png',
233+
bbox_inches='tight', dpi=100)
233234

234235
#############################################
235236
# The saved file looks like:
236237
#
237-
# .. image:: /_static/constrained_layout/CL01.png
238+
# .. image:: /_static/constrained_layout_1b.png
238239
# :align: center
239240
#
240241
# A better way to get around this awkwardness is to simply
@@ -245,12 +246,13 @@ def example_plot(ax, fontsize=12, hide_labels=False):
245246
labels = [l.get_label() for l in lines]
246247
leg = fig.legend(lines, labels, loc='center left',
247248
bbox_to_anchor=(0.8, 0.5), bbox_transform=axs[1].transAxes)
248-
fig.savefig('CL02.png', bbox_inches='tight', dpi=100)
249+
fig.savefig('../../doc/_static/constrained_layout_2b.png',
250+
bbox_inches='tight', dpi=100)
249251

250252
#############################################
251253
# The saved file looks like:
252254
#
253-
# .. image:: /_static/constrained_layout/CL02.png
255+
# .. image:: /_static/constrained_layout_2b.png
254256
# :align: center
255257
#
256258

tutorials/intermediate/tight_layout_guide.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -152,18 +152,17 @@ def example_plot(ax, fontsize=12):
152152
# Caveats
153153
# =======
154154
#
155-
# * :func:`~matplotlib.pyplot.tight_layout` only considers ticklabels, axis
156-
# labels, and titles. Thus, other artists may be clipped and also may
157-
# overlap.
155+
# * `~matplotlib.pyplot.tight_layout` considers all artists on the axes by
156+
# default. To remove an artist from the layout calculation you can call
157+
# `.Artist.set_in_layout`.
158158
#
159-
# * It assumes that the extra space needed for ticklabels, axis labels,
160-
# and titles is independent of original location of axes. This is
161-
# often true, but there are rare cases where it is not.
159+
# * ``tight_layout`` assumes that the extra space needed for artists is
160+
# independent of the original location of axes. This is often true, but there
161+
# are rare cases where it is not.
162162
#
163-
# * pad=0 clips some of the texts by a few pixels. This may be a bug or
164-
# a limitation of the current algorithm and it is not clear why it
165-
# happens. Meanwhile, use of pad at least larger than 0.3 is
166-
# recommended.
163+
# * ``pad=0`` can clip some texts by a few pixels. This may be a bug or
164+
# a limitation of the current algorithm and it is not clear why it
165+
# happens. Meanwhile, use of pad larger than 0.3 is recommended.
167166
#
168167
# Use with GridSpec
169168
# =================

0 commit comments

Comments
 (0)
0