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

Method sign

lib/matplotlib/axes/_axes.py:2865–2866  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

2863 # want to know whether to put label on positive or negative direction
2864 # cannot use np.sign here because it will return 0 if x == 0
2865 def sign(x):
2866 return 1 if x >= 0 else -1
2867
2868 _api.check_in_list(['edge', 'center'], label_type=label_type)
2869

Callers 15

__call__Method · 0.80
tick_valuesMethod · 0.80
transform_non_affineMethod · 0.80
transform_non_affineMethod · 0.80
_snapMethod · 0.80
_onmoveMethod · 0.80
get_rsignMethod · 0.80
transform_non_affineMethod · 0.80
powerFunction · 0.80
index_to_coordinateFunction · 0.80
get_index_label_posFunction · 0.80

Calls

no outgoing calls

Tested by 2

powerFunction · 0.64