🌐 AI搜索 & 代理 主页
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/matplotlib/axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1892,7 +1892,7 @@ def setter(self, vmin, vmax, ignore=False):
setter(self, min(vmin, vmax, oldmin), max(vmin, vmax, oldmax),
ignore=True)
else:
setter(self, max(vmin, vmax, oldmax), min(vmin, vmax, oldmin),
setter(self, max(vmin, vmax, oldmin), min(vmin, vmax, oldmax),
ignore=True)
self.stale = True

Expand Down
7 changes: 7 additions & 0 deletions lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6411,3 +6411,10 @@ def test_bar_errbar_zorder():
assert capline.zorder > bar.zorder
for barlinecol in barlinecols:
assert barlinecol.zorder > bar.zorder


def test_set_ticks_inverted():
fig, ax = plt.subplots()
ax.invert_xaxis()
ax.set_xticks([.3, .7])
assert ax.get_xlim() == (1, 0)