Skip to content

Commit a022b52

Browse files
khyoxQuLogic
authored andcommitted
Override set_url() in class Tick
In the class Tick, the url attribute is not passed to any of the objects that are to be drawn. Suggested solution is to override the set_url() method in Tick to transfer the url attribute content to the tick labels, that are to be drawn.
1 parent 9ccdb1d commit a022b52

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/matplotlib/axis.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,19 @@ def set_label2(self, s):
316316
self.label2.set_text(s)
317317
self.stale = True
318318

319+
def set_url(self, url):
320+
"""
321+
Set the url of label1 and label2.
322+
323+
Parameters
324+
----------
325+
url : str
326+
"""
327+
super().set_url(url)
328+
self.label1.set_url(url)
329+
self.label2.set_url(url)
330+
self.stale = True
331+
319332
def _set_artist_props(self, a):
320333
a.set_figure(self.figure)
321334

0 commit comments

Comments
 (0)