从X,Y,Z数据,Excel或其他工具3D绘图 [英] 3D Plotting from X, Y, Z Data, Excel or other Tools

查看:437
本文介绍了从X,Y,Z数据,Excel或其他工具3D绘图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这样的数据:

1000    13  75.2
1000    21  79.21
1000    29  80.02
5000    29  87.9
5000    37  88.54
5000    45  88.56
10000   29  90.11
10000   37  90.79
10000   45  90.87

我想使用第一列作为x轴标签,第二列为y轴标签,第三列为z值。我想以这种方式显示一个表面。这样做最好的方法是什么?我试过Excel,但没有真正得到任何地方。有没有人有任何建议,一个工具来做到这一点?有没有人知道如何在Excel中执行此操作?

I want to use the first column as x axis labels, the second column as y axis labels and the third column as the z values. I want to display a surface in that manner. What is the best way to do this? I tried Excel but didn't really get anywhere. Does anyone have any suggestions for a tool to do this? Does anyone know how to do this in Excel?

谢谢

推荐答案

我最终使用 matplotlib :)

from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
import matplotlib.pyplot as plt
import numpy as np
x = [1000,1000,1000,1000,1000,5000,5000,5000,5000,5000,10000,10000,10000,10000,10000]
y = [13,21,29,37,45,13,21,29,37,45,13,21,29,37,45]
z = [75.2,79.21,80.02,81.2,81.62,84.79,87.38,87.9,88.54,88.56,88.34,89.66,90.11,90.79,90.87]
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.plot_trisurf(x, y, z, cmap=cm.jet, linewidth=0.2)
plt.show()

结果是 sweet

这篇关于从X,Y,Z数据,Excel或其他工具3D绘图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆