[ Web Proxy ]
URL:
Viewing: https://matplotlib.org/gallery/mplot3d/../axes_grid1/../../plot_types/unstructured/triplot.html [Back]  [Original]

triplot(x, y) — Matplotlib 3.11.2 documentation
Back to top
Search the docs ...:

triplot(x, y)#

Draw an unstructured triangular grid as lines and/or markers.

See triplot.

triplot [triplot]
import matplotlib.pyplot as plt
import numpy as np

plt.style.use('_mpl-gallery-nogrid')

# make data:
np.random.seed(1)
x = np.random.uniform(-3, 3, 256)
y = np.random.uniform(-3, 3, 256)
z = (1 - x/2 + x**5 + y**3) * np.exp(-x**2 - y**2)

# plot:
fig, ax = plt.subplots()

ax.triplot(x, y)

ax.set(xlim=(-3, 3), ylim=(-3, 3))

plt.show()

Gallery generated by Sphinx-Gallery


Web Proxy Viewer  |  New URL  |  Original Page