Python matplotlib.axes.Axes.contourf() Examples
The following are 22
code examples of matplotlib.axes.Axes.contourf().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
matplotlib.axes.Axes
, or try the search function
.
Example #1
Source File: pyplot.py From Computable with MIT License | 6 votes |
def contourf(*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.contourf(*args, **kwargs) draw_if_interactive() finally: ax.hold(washold) if ret._A is not None: sci(ret) return ret # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost
Example #2
Source File: pyplot.py From twitter-stock-recommendation with MIT License | 6 votes |
def contourf(*args, **kwargs): ax = gca() # Deprecated: allow callers to override the hold state # by passing hold=True|False washold = ax._hold hold = kwargs.pop('hold', None) if hold is not None: ax._hold = hold from matplotlib.cbook import mplDeprecation warnings.warn("The 'hold' keyword argument is deprecated since 2.0.", mplDeprecation) try: ret = ax.contourf(*args, **kwargs) finally: ax._hold = washold if ret._A is not None: sci(ret) return ret # Autogenerated by boilerplate.py. Do not edit as changes will be lost.
Example #3
Source File: pyplot.py From neural-network-animation with MIT License | 6 votes |
def contourf(*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.contourf(*args, **kwargs) draw_if_interactive() finally: ax.hold(washold) if ret._A is not None: sci(ret) return ret # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost
Example #4
Source File: pyplot.py From matplotlib-4-abaqus with MIT License | 6 votes |
def contourf(*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.contourf(*args, **kwargs) draw_if_interactive() finally: ax.hold(washold) if ret._A is not None: sci(ret) return ret # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost
Example #5
Source File: pyplot.py From python3_ios with BSD 3-Clause "New" or "Revised" License | 5 votes |
def contourf(*args, data=None, **kwargs): __ret = gca().contourf( *args, **({"data": data} if data is not None else {}), **kwargs) if __ret._A is not None: sci(__ret) # noqa return __ret # Autogenerated by boilerplate.py. Do not edit as changes will be lost.
Example #6
Source File: pyplot.py From Computable with MIT License | 5 votes |
def colorbar(mappable=None, cax=None, ax=None, **kw): if mappable is None: mappable = gci() if mappable is None: raise RuntimeError('No mappable was found to use for colorbar ' 'creation. First define a mappable such as ' 'an image (with imshow) or a contour set (' 'with contourf).') if ax is None: ax = gca() ret = gcf().colorbar(mappable, cax = cax, ax=ax, **kw) draw_if_interactive() return ret
Example #7
Source File: pyplot.py From twitter-stock-recommendation with MIT License | 5 votes |
def colorbar(mappable=None, cax=None, ax=None, **kw): if mappable is None: mappable = gci() if mappable is None: raise RuntimeError('No mappable was found to use for colorbar ' 'creation. First define a mappable such as ' 'an image (with imshow) or a contour set (' 'with contourf).') if ax is None: ax = gca() ret = gcf().colorbar(mappable, cax = cax, ax=ax, **kw) return ret
Example #8
Source File: pyplot.py From CogAlg with MIT License | 5 votes |
def contourf(*args, data=None, **kwargs): __ret = gca().contourf( *args, **({"data": data} if data is not None else {}), **kwargs) if __ret._A is not None: sci(__ret) # noqa return __ret # Autogenerated by boilerplate.py. Do not edit as changes will be lost.
Example #9
Source File: pyplot.py From CogAlg with MIT License | 5 votes |
def colorbar(mappable=None, cax=None, ax=None, **kw): if mappable is None: mappable = gci() if mappable is None: raise RuntimeError('No mappable was found to use for colorbar ' 'creation. First define a mappable such as ' 'an image (with imshow) or a contour set (' 'with contourf).') if ax is None: ax = gca() ret = gcf().colorbar(mappable, cax=cax, ax=ax, **kw) return ret
Example #10
Source File: pyplot.py From coffeegrindsize with MIT License | 5 votes |
def contourf(*args, data=None, **kwargs): __ret = gca().contourf( *args, **({"data": data} if data is not None else {}), **kwargs) if __ret._A is not None: sci(__ret) # noqa return __ret # Autogenerated by boilerplate.py. Do not edit as changes will be lost.
Example #11
Source File: pyplot.py From coffeegrindsize with MIT License | 5 votes |
def colorbar(mappable=None, cax=None, ax=None, **kw): if mappable is None: mappable = gci() if mappable is None: raise RuntimeError('No mappable was found to use for colorbar ' 'creation. First define a mappable such as ' 'an image (with imshow) or a contour set (' 'with contourf).') if ax is None: ax = gca() ret = gcf().colorbar(mappable, cax = cax, ax=ax, **kw) return ret
Example #12
Source File: axes3d.py From opticspy with MIT License | 5 votes |
def contourf(self, X, Y, Z, *args, **kwargs): ''' Create a 3D contourf plot. ========== ================================================ Argument Description ========== ================================================ *X*, *Y*, Data values as numpy.arrays *Z* *zdir* The direction to use: x, y or z (default) *offset* If specified plot a projection of the filled contour on this position in plane normal to zdir ========== ================================================ The positional and keyword arguments are passed on to :func:`~matplotlib.axes.Axes.contourf` Returns a :class:`~matplotlib.axes.Axes.contourf` .. versionchanged :: 1.1.0 The *zdir* and *offset* kwargs were added. ''' zdir = kwargs.pop('zdir', 'z') offset = kwargs.pop('offset', None) had_data = self.has_data() jX, jY, jZ = art3d.rotate_axes(X, Y, Z, zdir) cset = Axes.contourf(self, jX, jY, jZ, *args, **kwargs) self.add_contourf_set(cset, zdir, offset) self.auto_scale_xyz(X, Y, Z, had_data) return cset
Example #13
Source File: pyplot.py From matplotlib-4-abaqus with MIT License | 5 votes |
def colorbar(mappable=None, cax=None, ax=None, **kw): if mappable is None: mappable = gci() if mappable is None: raise RuntimeError('No mappable was found to use for colorbar ' 'creation. First define a mappable such as ' 'an image (with imshow) or a contour set (' 'with contourf).') if ax is None: ax = gca() ret = gcf().colorbar(mappable, cax = cax, ax=ax, **kw) draw_if_interactive() return ret
Example #14
Source File: pyplot.py From python3_ios with BSD 3-Clause "New" or "Revised" License | 5 votes |
def colorbar(mappable=None, cax=None, ax=None, **kw): if mappable is None: mappable = gci() if mappable is None: raise RuntimeError('No mappable was found to use for colorbar ' 'creation. First define a mappable such as ' 'an image (with imshow) or a contour set (' 'with contourf).') if ax is None: ax = gca() ret = gcf().colorbar(mappable, cax = cax, ax=ax, **kw) return ret
Example #15
Source File: pyplot.py From GraphicDesignPatternByPython with MIT License | 5 votes |
def contourf(*args, data=None, **kwargs): __ret = gca().contourf(*args, data=data, **kwargs) if __ret._A is not None: sci(__ret) return __ret # Autogenerated by boilerplate.py. Do not edit as changes will be lost.
Example #16
Source File: pyplot.py From GraphicDesignPatternByPython with MIT License | 5 votes |
def colorbar(mappable=None, cax=None, ax=None, **kw): if mappable is None: mappable = gci() if mappable is None: raise RuntimeError('No mappable was found to use for colorbar ' 'creation. First define a mappable such as ' 'an image (with imshow) or a contour set (' 'with contourf).') if ax is None: ax = gca() ret = gcf().colorbar(mappable, cax = cax, ax=ax, **kw) return ret
Example #17
Source File: axes3d.py From Computable with MIT License | 5 votes |
def contourf(self, X, Y, Z, *args, **kwargs): ''' Create a 3D contourf plot. ========== ================================================ Argument Description ========== ================================================ *X*, *Y*, Data values as numpy.arrays *Z* *zdir* The direction to use: x, y or z (default) *offset* If specified plot a projection of the filled contour on this position in plane normal to zdir ========== ================================================ The positional and keyword arguments are passed on to :func:`~matplotlib.axes.Axes.contourf` Returns a :class:`~matplotlib.axes.Axes.contourf` .. versionchanged :: 1.1.0 The *zdir* and *offset* kwargs were added. ''' zdir = kwargs.pop('zdir', 'z') offset = kwargs.pop('offset', None) had_data = self.has_data() jX, jY, jZ = art3d.rotate_axes(X, Y, Z, zdir) cset = Axes.contourf(self, jX, jY, jZ, *args, **kwargs) self.add_contourf_set(cset, zdir, offset) self.auto_scale_xyz(X, Y, Z, had_data) return cset
Example #18
Source File: pyplot.py From neural-network-animation with MIT License | 5 votes |
def colorbar(mappable=None, cax=None, ax=None, **kw): if mappable is None: mappable = gci() if mappable is None: raise RuntimeError('No mappable was found to use for colorbar ' 'creation. First define a mappable such as ' 'an image (with imshow) or a contour set (' 'with contourf).') if ax is None: ax = gca() ret = gcf().colorbar(mappable, cax = cax, ax=ax, **kw) draw_if_interactive() return ret
Example #19
Source File: axes3d.py From matplotlib-4-abaqus with MIT License | 5 votes |
def tricontourf(self, X, Y, Z, offset=None, zdir='z', *args, **kwargs): ''' Create a 3D contourf plot. ========== ================================================ Argument Description ========== ================================================ *X*, *Y*, Data values as numpy.arrays *Z* *zdir* The direction to use: x, y or z (default) *offset* If specified plot a projection of the contour lines on this position in plane normal to zdir ========== ================================================ Other keyword arguments are passed on to :func:`~matplotlib.axes.Axes.tricontour` Returns a :class:`~matplotlib.axes.Axes.contour` .. versionadded :: 1.1.0 ''' zdir = kwargs.pop('zdir', 'z') offset = kwargs.pop('offset', None) had_data = self.has_data() jX, jY, jZ = art3d.rotate_axes(X, Y, Z, zdir) cset = Axes.tricontourf(self, X, Y, Z, *args, **kwargs) self.add_contourf_set(cset, zdir, offset) self.auto_scale_xyz(X, Y, Z, had_data) return cset
Example #20
Source File: axes3d.py From matplotlib-4-abaqus with MIT License | 5 votes |
def contourf(self, X, Y, Z, *args, **kwargs): ''' Create a 3D contourf plot. ========== ================================================ Argument Description ========== ================================================ *X*, *Y*, Data values as numpy.arrays *Z* *zdir* The direction to use: x, y or z (default) *offset* If specified plot a projection of the filled contour on this position in plane normal to zdir ========== ================================================ The positional and keyword arguments are passed on to :func:`~matplotlib.axes.Axes.contourf` Returns a :class:`~matplotlib.axes.Axes.contourf` .. versionchanged :: 1.1.0 The *zdir* and *offset* kwargs were added. ''' zdir = kwargs.pop('zdir', 'z') offset = kwargs.pop('offset', None) had_data = self.has_data() jX, jY, jZ = art3d.rotate_axes(X, Y, Z, zdir) cset = Axes.contourf(self, jX, jY, jZ, *args, **kwargs) self.add_contourf_set(cset, zdir, offset) self.auto_scale_xyz(X, Y, Z, had_data) return cset
Example #21
Source File: axes3d.py From Computable with MIT License | 5 votes |
def tricontourf(self, X, Y, Z, offset=None, zdir='z', *args, **kwargs): ''' Create a 3D contourf plot. ========== ================================================ Argument Description ========== ================================================ *X*, *Y*, Data values as numpy.arrays *Z* *zdir* The direction to use: x, y or z (default) *offset* If specified plot a projection of the contour lines on this position in plane normal to zdir ========== ================================================ Other keyword arguments are passed on to :func:`~matplotlib.axes.Axes.tricontour` Returns a :class:`~matplotlib.axes.Axes.contour` .. versionadded :: 1.1.0 ''' zdir = kwargs.pop('zdir', 'z') offset = kwargs.pop('offset', None) had_data = self.has_data() jX, jY, jZ = art3d.rotate_axes(X, Y, Z, zdir) cset = Axes.tricontourf(self, X, Y, Z, *args, **kwargs) self.add_contourf_set(cset, zdir, offset) self.auto_scale_xyz(X, Y, Z, had_data) return cset
Example #22
Source File: axes3d.py From opticspy with MIT License | 4 votes |
def tricontourf(self, *args, **kwargs): """ Create a 3D contourf plot. ========== ================================================ Argument Description ========== ================================================ *X*, *Y*, Data values as numpy.arrays *Z* *zdir* The direction to use: x, y or z (default) *offset* If specified plot a projection of the contour lines on this position in plane normal to zdir ========== ================================================ Other keyword arguments are passed on to :func:`~matplotlib.axes.Axes.tricontour` Returns a :class:`~matplotlib.axes.Axes.contour` .. versionchanged :: 1.3.0 Added support for custom triangulations EXPERIMENTAL: This method currently produces incorrect output due to a longstanding bug in 3D PolyCollection rendering. """ zdir = kwargs.pop('zdir', 'z') offset = kwargs.pop('offset', None) had_data = self.has_data() tri, args, kwargs = Triangulation.get_from_args_and_kwargs( *args, **kwargs) X = tri.x Y = tri.y if 'Z' in kwargs: Z = kwargs.pop('Z') else: Z = args[0] # We do this so Z doesn't get passed as an arg to Axes.tricontourf args = args[1:] jX, jY, jZ = art3d.rotate_axes(X, Y, Z, zdir) tri = Triangulation(jX, jY, tri.triangles, tri.mask) cset = Axes.tricontourf(self, tri, jZ, *args, **kwargs) self.add_contourf_set(cset, zdir, offset) self.auto_scale_xyz(X, Y, Z, had_data) return cset