8000 Merge remote-tracking branch 'upstream/master' into linestyles · matplotlib/matplotlib@5e5652c · GitHub
[go: up one dir, main page]

Skip to content

Commit 5e5652c

Browse files
committed
Merge remote-tracking branch 'upstream/master' into linestyles
* upstream/master: Shorten some docstrings. Be a bit more stringent on invalid inputs. (#12627) Properly css-style exceptions in the documentation Deprecate passing drawstyle with linestyle as single string. update doc requirement
2 parents d353bde + f288977 commit 5e5652c

File tree

16 files changed

+133
-157
lines changed

16 files changed

+133
-157
lines changed

doc-requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ sphinx>=1.3,!=1.5.0,!=1.6.4,!=1.7.3,!=1.8.0
1010
colorspacious
1111
ipython
1212
ipywidgets
13-
numpydoc>=0.4
14-
pillow
15-
sphinx-gallery>=0.1.13
13+
numpydoc>=0.8
14+
pillow>=3.4
15+
sphinx-gallery>=0.2

doc/_static/mpl.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ td.field-body table.property-table tr:last-of-type td {
731731

732732
/*** function and class description ***/
733733
/* top-level definitions */
734-
dl.class, dl.function, dl.data {
734+
dl.class, dl.function, dl.data, dl.exception {
735735
border-top: 1px solid #888;
736736
padding-top: 0px;
737737
margin-top: 20px;
@@ -744,7 +744,7 @@ dl.method, dl.classmethod, dl.staticmethod, dl.attribute {
744744

745745

746746
dl.class > dt, dl.classmethod > dt, dl.method > dt, dl.function > dt,
747-
dl.attribute > dt, dl.staticmethod > dt, dl.data > dt {
747+
dl.attribute > dt, dl.staticmethod > dt, dl.data > dt, dl.exception > dt {
748748
background-color: #eff3f4;
749749
padding-left: 6px;
750750
padding-right: 6px;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Passing a Line2D's drawstyle together with the linestyle is deprecated
2+
``````````````````````````````````````````````````````````````````````
3+
4+
Instead of ``plt.plot(..., linestyle="steps--")``, use ``plt.plot(...,
5+
linestyle="--", drawstyle="steps")``. ``ds`` is now an alias for ``drawstyle``.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Invalid inputs
2+
``````````````
3+
4+
Passing invalid locations to `legend` and `table` used to fallback on a default
5+
location. This behavior is deprecated and will throw an exception in a future
6+
version.
7+
8+
`offsetbox.AnchoredText` is unable to handle the ``horizontalalignment`` or
9+
``verticalalignment`` kwargs, and used to ignore them with a warning. This
10+
behavior is deprecated and will throw an exception in a future version.
11+
12+
Passing steps less than 1 or greater than 10 to `MaxNLocator` used to result in
13+
undefined behavior. It now throws a ValueError.

doc/devel/documenting_mpl.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ requirements that are needed to build the documentation. They are listed in
5252
* Sphinx>=1.3, !=1.5.0, !=1.6.4, !=1.7.3
5353
* colorspacious
5454
* IPython
55-
* numpydoc>=0.4
56-
* Pillow
57-
* sphinx-gallery>=0.1.13
55+
* numpydoc>=0.8
56+
* Pillow>=3.4
57+
* sphinx-gallery>=0.2
5858
* graphviz
5959

6060
.. note::

lib/matplotlib/afm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def _to_bool(s):
8181
def _sanity_check(fh):
8282
"""
8383
Check if the file at least looks like AFM.
84-
If not, raise :exc:`RuntimeError`.
84+
If not, raise `RuntimeError`.
8585
"""
8686

8787
# Remember the file position in case the caller wants to

lib/matplotlib/axes/_axes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2048,8 +2048,7 @@ def step(self, x, y, *args, where='pre', **kwargs):
20482048
if where not in ('pre', 'post', 'mid'):
20492049
raise ValueError("'where' argument to step must be "
20502050
"'pre', 'post' or 'mid'")
2051-
kwargs['linestyle'] = 'steps-' + where + kwargs.get('linestyle', '')
2052-
2051+
kwargs['drawstyle'] = 'steps-' + where
20532052
return self.plot(x, y, *args, **kwargs)
20542053

20552054
@_preprocess_data(replace_names=["x", "left",

0 commit comments

Comments
 (0)
0