matplotlib plot_trisurf没有边缘

pst*_*ekl 2 matplotlib

plot_trisurf是否可以不显示三角形的边缘?在所有示例中:http: //matplotlib.org/dev/examples/mplot3d/trisurf3d_demo2.html 显示三角形的边缘.

使用参数edgecolors ="none",边缘仍然可见.

编辑:我的意思是渲染工件,而不是边缘,仍然是可见的.

DrV*_*DrV 5

使用时适合我edgecolor='none'...(代码从matplotlib演示中被盗)

import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.tri as mtri

# u, v are parameterisation variables
u = (np.linspace(0, 2.0 * np.pi, endpoint=True, num=50) * np.ones((10, 1))).flatten()
v = np.repeat(np.linspace(-0.5, 0.5, endpoint=True, num=10), repeats=50).flatten()

# This is the Mobius mapping, taking a u, v pair and returning an x, y, z
# triple
x = (1 + 0.5 * v * np.cos(u / 2.0)) * np.cos(u)
y = (1 + 0.5 * v * np.cos(u / 2.0)) * np.sin(u)
z = 0.5 * v * np.sin(u / 2.0)

# Triangulate parameter space to determine the triangles
tri = mtri.Triangulation(u, v)

fig = plt.figure()
ax = fig.add_subplot(1, 1, 1, projection='3d')
ax.plot_trisurf(x,y,z,triangles=tri.triangles, cmap=plt.cm.Spectral, edgecolor='none')
Run Code Online (Sandbox Code Playgroud)

创建:

在此输入图像描述

剩下的边缘重影是渲染伪像.他们有问题吗?


Wol*_*tan 5

对我来说,DrV和AnandJ的组合正在与指定

  1. 一edgecolor='none',
  2. 一linewidth=0和
  3. 设置antialiased=False也。