gpt4 book ai didi

python - 移动图形时 matplotlib trisurf 缓慢

转载 作者:太空宇宙 更新时间:2023-11-04 11:12:59 25 4
gpt4 key购买 nike

共有4186个数据点。

这是我的电脑配置。移动图形非常慢。用类似数据的矩阵绘制曲面图有什么更快的方法吗?谢谢。

而且我的电脑还不错。磁盘是三星SSD EVO 840 500g

enter image description here

enter image description here

按照 mrcl 的建议使用 mayavi2 冲浪图,我的代码如下:

import pandas as pd
a = pd.read_csv('result.csv')
import numpy as np
from mayavi import mlab
x,y,z = a.fast.values, a.slow.values, a.profit.values
mlab.points3d(x,y,z)
mlab.show()

enter image description here

最佳答案

如何在 mayavi 中使用冲浪绘图的示例。

import numpy
from mayavi.mlab import *

def f(x, y):
sin, cos = numpy.sin, numpy.cos
return sin(x + y) + sin(2 * x - y) + cos(3 * x + 4 * y)

x, y = numpy.mgrid[-7.:7.05:0.1, -5.:5.05:0.05]
s = surf(x, y, f(x,y))
#cs = contour_surf(x, y, f, contour_z=0)
show()

干杯

关于python - 移动图形时 matplotlib trisurf 缓慢,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22263745/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com