Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- import matplotlib.pyplot as plt
- %matplotlib inline
- plt.rcParams['figure.figsize']=4,4
- plt.contour(
- np.arange(-1,1,0.01),
- np.arange(-1,1,0.01),
- np.angle(t[...,None] + 1j*t[None,...]) ,
- levels = 2*np.pi*np.arange(-1,1,0.025)
- )
- t = np.arange(-1,1,0.025)
- plt.contour(t,t, np.angle(t[...,None] + 1j*t[None,...]) , levels = 2*np.pi*np.arange(-1,1,0.025))
- L = 0.25
- plt.xlim([-L,L])
- plt.ylim([-L,L])
- import inspect
- print inspect.getsource(plt.contour)
- @_autogen_docstring(Axes.contour)
- def contour(*args, **kwargs):
- ax = gca()
- # allow callers to override the hold state by passing hold=True|False
- washold = ax.ishold()
- hold = kwargs.pop('hold', None)
- if hold is not None:
- ax.hold(hold)
- try:
- ret = ax.contour(*args, **kwargs)
- draw_if_interactive()
- finally:
- ax.hold(washold)
- if ret._A is not None: sci(ret)
- return ret
- print inspect.getsource(plt.Axes.contour)
- def contour(self, *args, **kwargs):
- if not self._hold:
- self.cla()
- kwargs['filled'] = False
- return mcontour.QuadContourSet(self, *args, **kwargs)
- import matplotlib
- print inspect.getsource(matplotlib.contour.QuadContourSet)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement