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

Skip to content

Commit a658fbc

Browse files
authored
Update widgets.py
1 parent 21c5307 commit a658fbc

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

lib/matplotlib/widgets.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ def __init__(self, ax, label, initial='',
10341034
xlim=(0, 1), ylim=(0, 1), # s.t. cursor appears from first click.
10351035
navigate=False, facecolor=color,
10361036
xticks=[], yticks=[])
1037-
1037+
10381038
self.cursor_index = 0
10391039

10401040
self.cursor = ax.vlines(0, 0, 0, visible=False, color="k", lw=1,
@@ -1074,14 +1074,14 @@ def _rendercursor(self):
10741074
self.text_disp.set_text(widthtext or ",")
10751075
bb_2 = self.text_disp.get_window_extent()
10761076

1077-
if bb_1.y0 == bb_1.y1 : #no text
1077+
if bb_1.y0 == bb_1.y1: # no text
10781078
bb_1.y0 -= (bb_2.y1-bb_2.y0)/2
10791079
bb_1.y1 += (bb_2.y1-bb_2.y0)/2
1080-
elif not widthtext: #cursor at index 0
1080+
elif not widthtext: # cursor at index 0
10811081
bb_1.x1 = bb_1.x0
1082-
else :
1082+
else:
10831083
bb_1.x1 = bb_1.x0 + (bb_2.x1 - bb_2.x0)
1084-
1084+
10851085
self.cursor.set(
10861086
segments=[[(bb_1.x1, bb_1.y0), (bb_1.x1, bb_1.y1)]], visible=True)
10871087
self.text_disp.set_text(text)

0 commit comments

Comments
 (0)