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

Function fmt_e

lib/mpl_toolkits/mplot3d/tests/test_axes3d.py:3032–3038  ·  view source on GitHub ↗
(x, pos=None)

Source from the content-addressed store, hash-verified

3030 if base == np.e:
3031 # Format tick labels as e^n instead of 2.718...^n
3032 def fmt_e(x, pos=None):
3033 if x <= 0:
3034 return ''
3035 exp = np.log(x)
3036 if np.isclose(exp, round(exp)):
3037 return r'$e^{%d}$' % round(exp)
3038 return ''
3039 ax.xaxis.set_major_formatter(fmt_e)
3040 ax.yaxis.set_major_formatter(fmt_e)
3041 ax.zaxis.set_major_formatter(fmt_e)

Callers

nothing calls this directly

Calls 1

iscloseMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…