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

Method set_offset_position

site-packages/matplotlib/axis.py:2350–2366  ·  view source on GitHub ↗

Parameters ---------- position : {'left', 'right'}

(self, position)

Source from the content-addressed store, hash-verified

2348 )
2349
2350 def set_offset_position(self, position):
2351 """
2352 Parameters
2353 ----------
2354 position : {'left', 'right'}
2355 """
2356 x, y = self.offsetText.get_position()
2357 if position == 'left':
2358 x = 0
2359 elif position == 'right':
2360 x = 1
2361 else:
2362 raise ValueError("Position accepts only [ 'left' | 'right' ]")
2363
2364 self.offsetText.set_ha(position)
2365 self.offsetText.set_position((x, y))
2366 self.stale = True
2367
2368 def get_text_widths(self, renderer):
2369 bbox, bbox2 = self.get_ticklabel_extents(renderer)

Callers 2

set_ticks_positionMethod · 0.95
twinxMethod · 0.45

Calls 2

get_positionMethod · 0.45
set_positionMethod · 0.45

Tested by

no test coverage detected