Skip to content

Commit df4c5c1

Browse files
authored
Merge pull request matplotlib#17638 from matplotlib/v3.2.1-doc
V3.2.1 doc
2 parents 43204ba + e751f95 commit df4c5c1

File tree

8 files changed

+55
-28
lines changed

8 files changed

+55
-28
lines changed

doc/_static/mpl.css

+28-4
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,30 @@ figcaption {
926926
#unreleased-message a {
927927
color: #fff;
928928
text-decoration:underline;
929+
930+
}
931+
932+
/* top-banner style message. */
933+
#annc-banner {
934+
box-sizing: border-box;
935+
left: 0;
936+
min-height: 3em;
937+
padding: 0.7em;
938+
top: 0;
939+
width: 100%;
940+
z-index: 10000;
941+
background-image: linear-gradient(90deg, #440154, #482475, #414487, #355f8d, #2a788e, #21908d, #22a884, #42be71, #7ad151, #bddf26, #bddf26);
942+
padding: 5px
943+
}
944+
945+
#annc-banner a {
946+
font-weight: bold;
947+
}
948+
949+
#annc-banner p{
950+
background-color: rgba(255, 255, 255, .8);
951+
padding: 13px;
952+
margin:0;
929953
}
930954

931955
/* Fork me on GitHub "button" */
@@ -1079,10 +1103,6 @@ p.caption {
10791103
font-weight: bold;
10801104
}
10811105

1082-
div#gallery.section, div#tutorials.section {
1083-
overflow: hidden;
1084-
}
1085-
10861106
.sphx-glr-multi-img{
10871107
max-width: 99% !important;
10881108
}
@@ -1254,3 +1274,7 @@ div.bullet-box li {
12541274
flex: 0 0 90%;
12551275
}
12561276
}
1277+
1278+
div#gallery.section .sphx-glr-clear:first-of-type, div#tutorials.section .sphx-glr-clear:first-of-type{
1279+
display: none;
1280+
}

doc/_templates/layout.html

+9
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<li><a href="{{ pathto('contents') }}">contents</a> &raquo;</li>
66
{%- endblock %}
77

8+
89
{%- block relbar1 %}{{ relbar() }}{% endblock %}
910
{%- block relbar2 %}{% endblock %}
1011

@@ -27,7 +28,15 @@
2728
Try searching for the released version of this page instead?
2829
</a>
2930
</div>
31+
3032
{%- endif %}
33+
34+
<!--
35+
<div id="annc-banner">
36+
37+
</div>
38+
-->
39+
3140
<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px; position: relative;">
3241
{%- if builder in ('htmlhelp', 'devhelp', 'latex') %}
3342
<a href="{{ pathto('index') }}">

doc/conf.py

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
# General configuration
3030
# ---------------------
3131

32+
# Strip backslahes in function's signature
33+
# To be removed when numpydoc > 0.9.x
34+
strip_signature_backslash = True
35+
3236
# Add any Sphinx extension module names here, as strings. They can be
3337
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
3438
extensions = [

doc/faq/howto_faq.rst

+5-13
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,12 @@ Plot `numpy.datetime64` values
2121
As of Matplotlib 2.2, `numpy.datetime64` objects are handled the same way
2222
as `datetime.datetime` objects.
2323

24-
If you prefer the pandas converters and locators, you can register their
25-
converter with the `matplotlib.units` module::
26-
27-
from pandas.tseries import converter as pdtc
28-
pdtc.register()
29-
30-
If you only want to use the `pandas` converter for `numpy.datetime64` values ::
31-
32-
from pandas.tseries import converter as pdtc
33-
import matplotlib.units as munits
34-
import numpy as np
35-
36-
munits.registry[np.datetime64] = pdtc.DatetimeConverter()
24+
If you prefer the pandas converters and locators, you can register them. This
25+
is done automatically when calling a pandas plot function and may be
26+
unnecessary when using pandas instead of Matplotlib directly. ::
3727

28+
from pandas.plotting import register_matplotlib_converters
29+
register_matplotlib_converters()
3830

3931

4032
.. _howto-figure-empty:

examples/pyplots/auto_subplots_adjust.py

+6-8
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,12 @@ def on_draw(event):
2828
# want the inverse of that
2929
bboxi = bbox.inverse_transformed(fig.transFigure)
3030
bboxes.append(bboxi)
31-
32-
# this is the bbox that bounds all the bboxes, again in relative
33-
# figure coords
34-
bbox = mtransforms.Bbox.union(bboxes)
35-
if fig.subplotpars.left < bbox.width:
36-
# we need to move it over
37-
fig.subplots_adjust(left=1.1*bbox.width) # pad a little
38-
fig.canvas.draw()
31+
# the bbox that bounds all the bboxes, again in relative figure coords
32+
bbox = mtransforms.Bbox.union(bboxes)
33+
if fig.subplotpars.left < bbox.width:
34+
# we need to move it over
35+
fig.subplots_adjust(left=1.1*bbox.width) # pad a little
36+
fig.canvas.draw()
3937

4038
fig.canvas.mpl_connect('draw_event', on_draw)
4139

lib/matplotlib/colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ class ColorbarBase(_ColorbarMappableDummy):
405405
406406
ticklocation : {'auto', 'left', 'right', 'top', 'bottom'}
407407
408-
extend : {'neiter', 'both', 'min', 'max'}
408+
extend : {'neither', 'both', 'min', 'max'}
409409
410410
spacing : {'uniform', 'proportional'}
411411

lib/matplotlib/pyplot.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1500,7 +1500,7 @@ def yticks(ticks=None, labels=None, **kwargs):
15001500
Parameters
15011501
----------
15021502
ticks : array-like, optional
1503-
The list of xtick locations. Passing an empty list removes all xticks.
1503+
The list of ytick locations. Passing an empty list removes all yticks.
15041504
labels : array-like, optional
15051505
The labels to place at the given *ticks* locations. This argument can
15061506
only be passed if *ticks* is passed as well.

requirements/doc/doc-requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ ipython
1313
ipywidgets
1414
numpydoc>=0.8
1515
pillow>=3.4,!=5.4.0
16-
sphinx-gallery>=0.2
16+
sphinx-gallery>=0.5
1717
sphinx-copybutton

0 commit comments

Comments
 (0)