本文整理汇总了Python中matplotlib.axes.Axes.tricontourf方法的典型用法代码示例。如果您正苦于以下问题:Python Axes.tricontourf方法的具体用法?Python Axes.tricontourf怎么用?Python Axes.tricontourf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.axes.Axes
的用法示例。
在下文中一共展示了Axes.tricontourf方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: tricontourf
# 需要导入模块: from matplotlib.axes import Axes [as 别名]
# 或者: from matplotlib.axes.Axes import tricontourf [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*
*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`
'''
had_data = self.has_data()
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
示例2: tricontourf
# 需要导入模块: from matplotlib.axes import Axes [as 别名]
# 或者: from matplotlib.axes.Axes import tricontourf [as 别名]
def tricontourf(self, *args, **kwargs):
"""
If the **mantid** projection is chosen, it can be
used the same as :py:meth:`matplotlib.axes.Axes.tricontourf` for arrays,
or it can be used to plot :class:`mantid.api.MatrixWorkspace`
or :class:`mantid.api.IMDHistoWorkspace`. You can have something like::
import matplotlib.pyplot as plt
from mantid import plots
...
fig, ax = plt.subplots(subplot_kw={'projection':'mantid'})
ax.tricontourf(workspace) #for workspaces
ax.tricontourf(x,y,z) #for arrays
fig.show()
For keywords related to workspaces, see :func:`plotfunctions.tricontourf`
"""
if helperfunctions.validate_args(*args):
logger.debug('using plotfunctions')
workspace = args[0]
return self.track_workspace_artist(workspace,
plotfunctions.tricontourf(self, *args, **kwargs))
else:
return Axes.tricontourf(self, *args, **kwargs)