MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / func

Method func

site-packages/matplotlib/widgets.py:1170–1193  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

1168 self.slidertop, self.sliderwspace, self.sliderhspace,)
1169
1170 def func(event):
1171 thisdrawon = self.drawon
1172
1173 self.drawon = False
1174
1175 # store the drawon state of each slider
1176 bs = []
1177 for slider in sliders:
1178 bs.append(slider.drawon)
1179 slider.drawon = False
1180
1181 # reset the slider to the initial position
1182 for slider in sliders:
1183 slider.reset()
1184
1185 # reset drawon
1186 for slider, b in zip(sliders, bs):
1187 slider.drawon = b
1188
1189 # draw the canvas
1190 self.drawon = thisdrawon
1191 if self.drawon:
1192 toolfig.canvas.draw()
1193 self.targetfig.canvas.draw()
1194
1195 # during reset there can be a temporary invalid state
1196 # depending on the order of the reset so we turn off

Callers 1

__call__Method · 0.45

Calls 3

appendMethod · 0.45
resetMethod · 0.45
drawMethod · 0.45

Tested by

no test coverage detected