MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / set_theta_direction

Method set_theta_direction

lib/matplotlib/projections/polar.py:1112–1131  ·  view source on GitHub ↗

Set the direction in which theta increases. clockwise, -1: Theta increases in the clockwise direction counterclockwise, anticlockwise, 1: Theta increases in the counterclockwise direction

(self, direction)

Source from the content-addressed store, hash-verified

1110 return self.set_theta_offset(mapping[loc] + np.deg2rad(offset))
1111
1112 def set_theta_direction(self, direction):
1113 """
1114 Set the direction in which theta increases.
1115
1116 clockwise, -1:
1117 Theta increases in the clockwise direction
1118
1119 counterclockwise, anticlockwise, 1:
1120 Theta increases in the counterclockwise direction
1121 """
1122 mtx = self._direction.get_matrix()
1123 if direction in ('clockwise', -1):
1124 mtx[0, 0] = -1
1125 elif direction in ('counterclockwise', 'anticlockwise', 1):
1126 mtx[0, 0] = 1
1127 else:
1128 _api.check_in_list(
1129 [-1, 1, 'clockwise', 'counterclockwise', 'anticlockwise'],
1130 direction=direction)
1131 self._direction.invalidate()
1132
1133 def get_theta_direction(self):
1134 """

Callers 5

clearMethod · 0.95
test_polar_theta_limitsFunction · 0.80
test_polar_errorbarFunction · 0.80

Calls 2

get_matrixMethod · 0.45
invalidateMethod · 0.45

Tested by 4

test_polar_theta_limitsFunction · 0.64
test_polar_errorbarFunction · 0.64