Keywords: Example of a locally constant function with sgn(x).svg en This diagram shows that the function <math>f \R\setminus\ 0\ \to\R x\mapsto \begin cases 1 x > 0 \\ -1 x < 0 \end cases </math> is locally constant i e for each argument their is a neighborhood where the function is constant 2016-04-23 own http //kulla me/ Stephan Kulla User Stephan Kulla other fields Matplotlib + import matplotlib pyplot as plt from mpl_toolkits axes_grid1 inset_locator import zoomed_inset_axes mark_inset b 4 f ax plt subplots ax axhline color black ax axvline color black ax set_xlim -b b ax set_ylim -2 2 ax plot -b 0 -1 -1 color blue ax plot 0 b 1 1 color blue ax plot 0 15 1 color green ax plot 0 0 1 -1 o color white axins zoomed_inset_axes ax 10 loc 4 axins plot 0 05 0 25 1 1 color blue axins plot 0 15 1 o color green axins set_xlim 0 05 0 25 axins set_ylim 0 95 1 05 mark_inset ax axins loc1 3 loc2 1 fc 0 95 ec 0 7 plt xticks visible False plt yticks visible False plt savefig Example of a local constant function with sgn x svg cc-zero Signum function Basics of topology |