本文整理匯總了Python中matplotlib.axes.Axes.tricontour方法的典型用法代碼示例。如果您正苦於以下問題:Python Axes.tricontour方法的具體用法?Python Axes.tricontour怎麽用?Python Axes.tricontour使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類matplotlib.axes.Axes
的用法示例。
在下文中一共展示了Axes.tricontour方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: tricontour
# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import tricontour [as 別名]
def tricontour(*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.tricontour(*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
示例2: tricontour
# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import tricontour [as 別名]
def tricontour(*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.tricontour(*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.
示例3: tricontour
# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import tricontour [as 別名]
def tricontour(self, X, Y, Z, *args, **kwargs):
'''
Create a 3D contour plot.
========== ================================================
Argument Description
========== ================================================
*X*, *Y*, Data values as numpy.arrays
*Z*
*extend3d* Whether to extend contour in 3D (default: False)
*stride* Stride (step size) for extending contour
*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
'''
extend3d = kwargs.pop('extend3d', False)
stride = kwargs.pop('stride', 5)
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.tricontour(self, jX, jY, jZ, *args, **kwargs)
self.add_contour_set(cset, extend3d, stride, zdir, offset)
self.auto_scale_xyz(X, Y, Z, had_data)
return cset
示例4: tricontourf
# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import tricontour [as 別名]
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
示例5: tricontour
# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import tricontour [as 別名]
def tricontour(*args, **kwargs):
__ret = gca().tricontour(*args, **kwargs)
if __ret._A is not None: sci(__ret)
return __ret
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
示例6: tricontour
# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import tricontour [as 別名]
def tricontour(*args, **kwargs):
__ret = gca().tricontour(*args, **kwargs)
if __ret._A is not None: sci(__ret) # noqa
return __ret
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
示例7: tricontour
# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import tricontour [as 別名]
def tricontour(self, *args,
extend3d=False, stride=5, zdir='z', offset=None, **kwargs):
"""
Create a 3D contour plot.
========== ================================================
Argument Description
========== ================================================
*X*, *Y*, Data values as numpy.arrays
*Z*
*extend3d* Whether to extend contour in 3D (default: False)
*stride* Stride (step size) for extending contour
*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.
"""
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.tricontour
args = args[1:]
jX, jY, jZ = art3d.rotate_axes(X, Y, Z, zdir)
tri = Triangulation(jX, jY, tri.triangles, tri.mask)
cset = super().tricontour(tri, jZ, *args, **kwargs)
self.add_contour_set(cset, extend3d, stride, zdir, offset)
self.auto_scale_xyz(X, Y, Z, had_data)
return cset
示例8: tricontourf
# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import tricontour [as 別名]
def tricontourf(self, *args, zdir='z', offset=None, **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.
"""
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 = super().tricontourf(tri, jZ, *args, **kwargs)
self.add_contourf_set(cset, zdir, offset)
self.auto_scale_xyz(X, Y, Z, had_data)
return cset
示例9: tricontour
# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import tricontour [as 別名]
def tricontour(self, *args, **kwargs):
"""
Create a 3D contour plot.
========== ================================================
Argument Description
========== ================================================
*X*, *Y*, Data values as numpy.arrays
*Z*
*extend3d* Whether to extend contour in 3D (default: False)
*stride* Stride (step size) for extending contour
*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.
"""
extend3d = kwargs.pop('extend3d', False)
stride = kwargs.pop('stride', 5)
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.tricontour
args = args[1:]
jX, jY, jZ = art3d.rotate_axes(X, Y, Z, zdir)
tri = Triangulation(jX, jY, tri.triangles, tri.mask)
cset = Axes.tricontour(self, tri, jZ, *args, **kwargs)
self.add_contour_set(cset, extend3d, stride, zdir, offset)
self.auto_scale_xyz(X, Y, Z, had_data)
return cset
示例10: tricontourf
# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import tricontour [as 別名]
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
示例11: tricontour
# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import tricontour [as 別名]
def tricontour(self, *args,
extend3d=False, stride=5, zdir='z', offset=None, **kwargs):
"""
Create a 3D contour plot.
.. versionchanged:: 1.3.0
Added support for custom triangulations
.. note::
This method currently produces incorrect output due to a
longstanding bug in 3D PolyCollection rendering.
Parameters
----------
X, Y, Z : array-likes
Input data.
extend3d : bool
Whether to extend contour in 3D; defaults to False.
stride : int
Step size for extending contour.
zdir : {'x', 'y', 'z'}
The direction to use; defaults to 'z'.
offset : scalar
If specified, plot a projection of the contour lines at this
position in a plane normal to zdir
*args, **kwargs
Other arguments are forwarded to `matplotlib.axes.Axes.tricontour`.
Returns
-------
matplotlib.tri.tricontour.TriContourSet
"""
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.tricontour
args = args[1:]
jX, jY, jZ = art3d.rotate_axes(X, Y, Z, zdir)
tri = Triangulation(jX, jY, tri.triangles, tri.mask)
cset = super().tricontour(tri, jZ, *args, **kwargs)
self.add_contour_set(cset, extend3d, stride, zdir, offset)
self.auto_scale_xyz(X, Y, Z, had_data)
return cset
示例12: tricontourf
# 需要導入模塊: from matplotlib.axes import Axes [as 別名]
# 或者: from matplotlib.axes.Axes import tricontour [as 別名]
def tricontourf(self, *args, zdir='z', offset=None, **kwargs):
"""
Create a 3D filled contour plot.
.. note::
This method currently produces incorrect output due to a
longstanding bug in 3D PolyCollection rendering.
Parameters
----------
X, Y, Z : array-likes
Input data.
zdir : {'x', 'y', 'z'}
The direction to use; defaults to 'z'.
offset : scalar
If specified, plot a projection of the contour lines at this
position in a plane normal to zdir
*args, **kwargs
Other arguments are forwarded to
`matplotlib.axes.Axes.tricontourf`.
Returns
-------
matplotlib.tri.tricontour.TriContourSet
Notes
-----
.. versionadded:: 1.1.0
The *zdir* and *offset* parameters.
.. versionchanged:: 1.3.0
Added support for custom triangulations
"""
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 = super().tricontourf(tri, jZ, *args, **kwargs)
self.add_contourf_set(cset, zdir, offset)
self.auto_scale_xyz(X, Y, Z, had_data)
return cset