8000 Merge pull request #7605 from QuLogic/bar-sticky-edges · matplotlib/matplotlib@1b7bec6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1b7bec6

authored
Merge pull request #7605 from QuLogic/bar-sticky-edges
MNT: Make bars stick to explicitly-specified edges.
2 parents 7a354ae + 76cd3dd commit 1b7bec6

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

examples/pylab_examples/log_bar.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,5 @@
1717
y = [d[i] for d in data]
1818
b = plt.bar(x + i * dimw, y, dimw, bottom=0.001)
1919
plt.xticks(x + w / 2)
20-
plt.ylim((0.001, 1000))
2120

2221
plt.show()

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2129,9 +2129,9 @@ def make_iterable(x):
21292129
r.update(kwargs)
21302130
r.get_path()._interpolation_steps = 100
21312131
if orientation == 'vertical':
2132-
r.sticky_edges.y.append(0)
2132+
r.sticky_edges.y.append(b)
21332133
elif orientation == 'horizontal':
2134-
r.sticky_edges.x.append(0)
2134+
r.sticky_edges.x.append(l)
21352135
self.add_patch(r)
21362136
patches.append(r)
21372137

0 commit comments

Comments
 (0)
0