Skip to content

Commit 7688c90

Browse files
committed
Merge branch 'v1.5.x' into v2.x
2 parents 4fd5f55 + f2f557c commit 7688c90

File tree

10 files changed

+37
-14
lines changed

10 files changed

+37
-14
lines changed

doc/devel/gitwash/set_up_fork.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Linking your repository to the upstream repo
5252
main matplotlib_ repository at `matplotlib github`_.
5353

5454
Note that we've used ``git://`` for the URL rather than ``git@``. The
55-
``git://`` URL is read only. This means we that we can't accidentally
55+
``git://`` URL is read only. This means that we can't accidentally
5656
(or deliberately) write to the upstream repo, and we are only going to
5757
use it to merge into our own code.
5858

doc/users/plotting/examples/axes_zoom_effect.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/api/filled_step.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def filled_hist(ax, edges, values, bottoms=None, orientation='v',
4141
"""
4242
print(orientation)
4343
if orientation not in set('hv'):
44-
raise ValueError("orientation must be in {'h', 'v'} "
44+
raise ValueError("orientation must be in {{'h', 'v'}} "
4545
"not {o}".format(o=orientation))
4646

4747
kwargs.setdefault('step', 'post')

lib/matplotlib/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,6 +1441,7 @@ def tk_window_focus():
14411441
'matplotlib.tests.test_colorbar',
14421442
'matplotlib.tests.test_colors',
14431443
'matplotlib.tests.test_compare_images',
1444+
'matplotlib.tests.test_container',
14441445
'matplotlib.tests.test_contour',
14451446
'matplotlib.tests.test_dates',
14461447
'matplotlib.tests.test_delaunay',

lib/matplotlib/axes/_axes.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -633,21 +633,22 @@ def annotate(self, *args, **kwargs):
633633
label
634634
635635
xy : (x, y)
636-
position of element to annotate
636+
position of element to annotate. See *xycoords* to control what
637+
coordinate system this value is interpretated in.
637638
638639
xytext : (x, y) , optional, default: None
639-
position of the label `s`
640+
position of the label `s`. See *textcoords* to control what
641+
coordinate system this value is interpreted in.
640642
641643
xycoords : string, optional, default: "data"
642644
string that indicates what type of coordinates `xy` is. Examples:
643645
"figure points", "figure pixels", "figure fraction", "axes
644646
points", .... See `matplotlib.text.Annotation` for more details.
645647
646-
textcoords : string, optional
648+
textcoords : string, optional, default: None
647649
string that indicates what type of coordinates `text` is. Examples:
648650
"figure points", "figure pixels", "figure fraction", "axes
649651
points", .... See `matplotlib.text.Annotation` for more details.
650-
Default is None.
651652
652653
arrowprops : `matplotlib.lines.Line2D` properties, optional
653654
Dictionary of line properties for the arrow that connects

lib/matplotlib/colors.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -904,8 +904,11 @@ def process_value(value):
904904
is_scalar = False
905905
result = ma.asarray(value)
906906
if result.dtype.kind == 'f':
907-
if isinstance(value, np.ndarray):
908-
result = result.copy()
907+
# this is overkill for lists of floats, but required
908+
# to support pd.Series as input until we can reliable
909+
# determine if result and value share memory in all cases
910+
# (list, tuple, deque, ndarray, Series, ...)
911+
result = result.copy()
909912
elif result.dtype.itemsize > 2:
910913
result = result.astype(np.float)
911914
else:

lib/matplotlib/container.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from matplotlib.externals import six
55

66
import matplotlib.cbook as cbook
7+
import matplotlib.artist as martist
78

89

910
class Container(tuple):
@@ -31,7 +32,9 @@ def set_remove_method(self, f):
3132
self._remove_method = f
3233

3334
def remove(self):
34-
for c in self:
35+
for c in cbook.flatten(self,
36+
scalarp=lambda x: isinstance(x,
37+
martist.Artist)):
3538
c.remove()
3639

3740
if self._remove_method:
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from __future__ import (absolute_import, division, print_function,
2+
unicode_literals)
3+
4+
from matplotlib.externals import six
5+
import matplotlib.pyplot as plt
6+
7+
from matplotlib.testing.decorators import cleanup
8+
9+
10+
@cleanup
11+
def test_stem_remove():
12+
ax = plt.gca()
13+
st = ax.stem([1, 2], [1, 2])
14+
st.remove()

lib/matplotlib/widgets.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,7 +1590,7 @@ def __init__(self, ax, x, y, marker='o', marker_props=None, useblit=True):
15901590
self.ax = ax
15911591

15921592
props = dict(marker=marker, markersize=7, mfc='w', ls='none',
1593-
alpha=0.5, visible=False)
1593+
alpha=0.5, visible=False, label='_nolegend_')
15941594
props.update(marker_props if marker_props is not None else {})
15951595
self._markers = Line2D(x, y, animated=useblit, **props)
15961596
self.ax.add_line(self._markers)
@@ -1788,11 +1788,13 @@ def __init__(self, ax, onselect, drawtype='box',
17881788
self._edge_order = ['W', 'N', 'E', 'S']
17891789
xe, ye = self.edge_centers
17901790
self._edge_handles = ToolHandles(self.ax, xe, ye, marker='s',
1791-
marker_props=props, useblit=self.useblit)
1791+
marker_props=props,
1792+
useblit=self.useblit)
17921793

17931794
xc, yc = self.center
17941795
self._center_handle = ToolHandles(self.ax, [xc], [yc], marker='s',
1795-
marker_props=props, useblit=self.useblit)
1796+
marker_props=props,
1797+
useblit=self.useblit)
17961798

17971799
self.active_handle = None
17981800

unit/threading_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def png_thread(tn):
3737
ax.hist(vals, 50)
3838
FigureCanvas(fig).print_png(png_f)
3939

40-
except Exception, excp:
40+
except Exception as excp:
4141
pass
4242

4343
png_f.close()

0 commit comments

Comments
 (0)