Plot a triangulated surface. The (optional) triangulation can be specified in one of two ways; either:: plot_trisurf(triangulation, ...) where triangulation is a `~matplotlib.tri.Triangulation` object, or:: plot_trisurf(X, Y, ...) pl
(self, *args, color=None, norm=None, vmin=None, vmax=None,
lightsource=None, axlim_clip=False, **kwargs)
| 2698 | return linec |
| 2699 | |
| 2700 | def plot_trisurf(self, *args, color=None, norm=None, vmin=None, vmax=None, |
| 2701 | lightsource=None, axlim_clip=False, **kwargs): |
| 2702 | """ |
| 2703 | Plot a triangulated surface. |
| 2704 | |
| 2705 | The (optional) triangulation can be specified in one of two ways; |
| 2706 | either:: |
| 2707 | |
| 2708 | plot_trisurf(triangulation, ...) |
| 2709 | |
| 2710 | where triangulation is a `~matplotlib.tri.Triangulation` object, or:: |
| 2711 | |
| 2712 | plot_trisurf(X, Y, ...) |
| 2713 | plot_trisurf(X, Y, triangles, ...) |
| 2714 | plot_trisurf(X, Y, triangles=triangles, ...) |
| 2715 | |
| 2716 | in which case a Triangulation object will be created. See |
| 2717 | `.Triangulation` for an explanation of these possibilities. |
| 2718 | |
| 2719 | The remaining arguments are:: |
| 2720 | |
| 2721 | plot_trisurf(..., Z) |
| 2722 | |
| 2723 | where *Z* is the array of values to contour, one per point |
| 2724 | in the triangulation. |
| 2725 | |
| 2726 | Parameters |
| 2727 | ---------- |
| 2728 | X, Y, Z : array-like |
| 2729 | Data values as 1D arrays. |
| 2730 | color |
| 2731 | Color of the surface patches. |
| 2732 | cmap |
| 2733 | A colormap for the surface patches. |
| 2734 | norm : `~matplotlib.colors.Normalize`, optional |
| 2735 | An instance of Normalize to map values to colors. |
| 2736 | vmin, vmax : float, optional |
| 2737 | Minimum and maximum value to map. |
| 2738 | shade : bool, default: True |
| 2739 | Whether to shade the facecolors. Shading is always disabled when |
| 2740 | *cmap* is specified. |
| 2741 | lightsource : `~matplotlib.colors.LightSource`, optional |
| 2742 | The lightsource to use when *shade* is True. |
| 2743 | axlim_clip : bool, default: False |
| 2744 | Whether to hide patches with a vertex outside the axes view limits. |
| 2745 | |
| 2746 | .. versionadded:: 3.10 |
| 2747 | **kwargs |
| 2748 | All other keyword arguments are passed on to |
| 2749 | :class:`~mpl_toolkits.mplot3d.art3d.Poly3DCollection` |
| 2750 | |
| 2751 | Examples |
| 2752 | -------- |
| 2753 | .. plot:: gallery/mplot3d/trisurf3d.py |
| 2754 | .. plot:: gallery/mplot3d/trisurf3d_2.py |
| 2755 | """ |
| 2756 | |
| 2757 | had_data = self.has_data() |