Skip to content
Open
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
11 changes: 10 additions & 1 deletion lib/matplotlib/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2119,11 +2119,20 @@ def onmove(self, event):
self.lineh.set_visible(self.visible and self.horizOn)
if not (self.visible and (self.vertOn or self.horizOn)):
return
# Redraw.
# Redraw.
if self.useblit:
background = self._load_blit_background()
if background is not None:
self.canvas.restore_region(background)

# --- UPDATED FIX STARTS HERE ---
# If there are other axes overlapping with the cursor's area,
# redraw them completely.
for ax_ in self.ax.get_figure(root=True).get_axes():
if ax_ is not self.ax and self.ax.bbox.overlaps(ax_.bbox):
self.ax.draw_artist(ax_)
# --- UPDATED FIX ENDS HERE ---

self.ax.draw_artist(self.linev)
self.ax.draw_artist(self.lineh)
self.canvas.blit(self.ax.bbox)
Expand Down
Loading