8000 DOC: add comment about buffer overrun at DEBUG · matplotlib/matplotlib@a449c39 · GitHub
[go: up one dir, main page]

Skip to content

Commit a449c39

Browse files
committed
DOC: add comment about buffer overrun at DEBUG
1 parent 1fea02c commit a449c39

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

lib/matplotlib/animation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,8 @@ def _args(self):
669669
'-s', '%dx%d' % self.frame_size, '-pix_fmt', self.frame_format,
670670
'-r', str(self.fps)]
671671
# Logging is quieted because subprocess.PIPE has limited buffer size.
672-
672+
# If you have a lot of frames in your animation and set logging to
673+
# DEBUG, you will have a buffer overrun.
673674
if (_log.getEffectiveLevel() > logging.DEBUG):
674675
args += ['-loglevel', 'quiet']
675676
args += ['-i', 'pipe:'] + self.output_args

lib/matplotlib/axes/_axes.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2227,7 +2227,9 @@ def bar(self, *args, **kwargs):
22272227
tick_label_axis = self.yaxis
22282228
tick_label_position = y
22292229

2230-
linewidth = itertools.cycle(np.atleast_1d(linewidth))
2230+
# linewidth = itertools.cycle(np.atleast_1d(linewidth))
2231+
if not iterable(linewidth):
2232+
linewidth = [linewidth]
22312233
color = itertools.chain(itertools.cycle(mcolors.to_rgba_array(color)),
22322234
# Fallback if color == "none".
22332235
itertools.repeat([0, 0, 0, 0]))
@@ -2257,6 +2259,13 @@ def bar(self, *args, **kwargs):
22572259
patches = []
22582260
args = zip(left, bottom, width, height, color, edgecolor, linewidth)
22592261
for l, b, w, h, c, e, lw in args:
2262+
print(l)
2263+
print(b)
2264+
print(w)
2265+
print(h)
2266+
print(c)
2267+
print(lw)
2268+
22602269
r = mpatches.Rectangle(
22612270
xy=(l, b), width=w, height=h,
22622271
facecolor=c,

0 commit comments

Comments
 (0)
0