Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4b53790

Browse files
committed
Merge pull request #7605 from QuLogic/bar-sticky-edges
MNT: Make bars stick to explicitly-specified edges.
1 parent fe721a6 commit 4b53790

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

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
@@ -2128,9 +2128,9 @@ def make_iterable(x):
21282128
r.update(kwargs)
21292129
r.get_path()._interpolation_steps = 100
21302130
if orientation == 'vertical':
2131-
r.sticky_edges.y.append(0)
2131+
r.sticky_edges.y.append(b)
21322132
elif orientation == 'horizontal':
2133-
r.sticky_edges.x.append(0)
2133+
r.sticky_edges.x.append(l)
21342134
self.add_patch(r)
21352135
patches.append(r)
21362136

0 commit comments

Comments
 (0)