Skip to content

Commit 23a8a47

Browse files
committed
Merge remote-tracking branch 'upstream/v1.3.x'
2 parents 1c499d9 + ed8d8d2 commit 23a8a47

File tree

4 files changed

+31
-15
lines changed

4 files changed

+31
-15
lines changed

lib/matplotlib/axes.py

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8468,18 +8468,22 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,
84688468
xvals.append(x.copy())
84698469
yvals.append(y.copy())
84708470

8471-
# add patches in reverse order so that when stacking,
8472-
# items lower in the stack are plottted on top of
8473-
# items higher in the stack
8474-
for x, y, c in reversed(zip(xvals, yvals, color)):
8475-
if fill:
8476-
patches.append(self.fill(x, y,
8477-
closed=True,
8478-
facecolor=c))
8479-
else:
8480-
patches.append(self.fill(x, y,
8481-
closed=True, edgecolor=c,
8482-
fill=False))
8471+
if fill:
8472+
# add patches in reverse order so that when stacking,
8473+
# items lower in the stack are plottted on top of
8474+
# items higher in the stack
8475+
for x, y, c in reversed(zip(xvals, yvals, color)):
8476+
patches.append(self.fill(
8477+
x, y,
8478+
closed=True,
8479+
facecolor=c))
8480+
else:
8481+
for x, y, c in reversed(zip(xvals, yvals, color)):
8482+
split = int(len(x) / 2) + 1
8483+
patches.append(self.fill(
8484+
x[:split], y[:split],
8485+
closed=False, edgecolor=c,
8486+
fill=False))
84838487

84848488
# we return patches, so put it back in the expected order
84858489
patches.reverse()

lib/matplotlib/dates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ def __init__(self, tz=None, minticks=5, maxticks=None,
787787
YEARLY: [1, 2, 4, 5, 10, 20, 40, 50, 100, 200, 400, 500,
788788
1000, 2000, 4000, 5000, 10000],
789789
MONTHLY: [1, 2, 3, 4, 6],
790-
DAILY: [1, 2, 3, 7, 14],
790+
DAILY: [1, 2, 3, 7, 14, 21],
791791
HOURLY: [1, 2, 3, 4, 6, 12],
792792
MINUTELY: [1, 5, 10, 15, 30],
793793
SECONDLY: [1, 5, 10, 15, 30],

lib/matplotlib/tests/test_dates.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,12 @@ def _create_auto_date_locator(date1, date2):
222222
'1990-09-01 00:00:00+00:00', '1990-10-01 00:00:00+00:00',
223223
'1990-11-01 00:00:00+00:00', '1990-12-01 00:00:00+00:00']
224224
],
225+
[datetime.timedelta(days=140),
226+
['1990-01-06 00:00:00+00:00', '1990-01-27 00:00:00+00:00',
227+
'1990-02-17 00:00:00+00:00', '1990-03-10 00:00:00+00:00',
228+
'1990-03-31 00:00:00+00:00', '1990-04-21 00:00:00+00:00',
229+
'1990-05-12 00:00:00+00:00']
230+
],
225231
[datetime.timedelta(days=40),
226232
['1990-01-03 00:00:00+00:00', '1990-01-10 00:00:00+00:00',
227233
'1990-01-17 00:00:00+00:00', '1990-01-24 00:00:00+00:00',

setupext.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,7 +1466,10 @@ def check(self):
14661466
# This check needs to be performed out-of-process, because
14671467
# importing gi and then importing regular old pygtk afterward
14681468
# segfaults the interpreter.
1469-
p = multiprocessing.Pool()
1469+
try:
1470+
p = multiprocessing.Pool()
1471+
except:
1472+
return "unknown (can not use multiprocessing to determine)"
14701473
success, msg = p.map(backend_gtk3agg_internal_check, [0])[0]
14711474
p.close()
14721475
p.join()
@@ -1518,7 +1521,10 @@ def check(self):
15181521
# This check needs to be performed out-of-process, because
15191522
# importing gi and then importing regular old pygtk afterward
15201523
# segfaults the interpreter.
1521-
p = multiprocessing.Pool()
1524+
try:
1525+
p = multiprocessing.Pool()
1526+
except:
1527+
return "unknown (can not use multiprocessing to determine)"
15221528
success, msg = p.map(backend_gtk3cairo_internal_check, [0])[0]
15231529
p.close()
15241530
p.join()

0 commit comments

Comments
 (0)