简体   繁体   English

如何使用matplotlib绘制f(x,y,z)= t

[英]How to plot f(x,y,z) = t with matplotlib

I have some datas that I need to display. 我有一些数据需要显示。

Because I use python, a quick search told me that matplotlib is the best solution. 因为我使用python,所以快速搜索告诉我matplotlib是最好的解决方案。

I looked at the docs, but i can only find information on how to plot a function f(x,y) = t. 我看了看文档,但是我只能找到有关如何绘制函数f(x,y)= t的信息。

My problem is coming when you add a fourth dimension. 当您添加第四个维度时,我的问题就来了。

I have four arrays of data. 我有四个数据数组。 The last dimension can be display with color informations. 最后一个尺寸可以显示颜色信息。

I started doing this : def f(x,y,z): #compute the function return t 我开始这样做: def f(x,y,z): #compute the function return t

x : np.arange(1,9,1)
y : np.arange(1,9,1)
z : np.arange(1,9,1)

then I create my data structure containing the f(x,y,z) for all x,y,z 然后我为所有x,y,z创建包含f(x,y,z)的数据结构

But then how should I display it ? 但是那我该如何显示呢?

Thanks in advance, 提前致谢,

Victor 胜利者

If the t is a given constant number, then see here . 如果t是给定的常数,则请参见此处

If the t is another parameter, then this question is actually that what the 4D world would look like. 如果t是另一个参数,那么这个问题实际上是4D世界的外观。 Let me know if you mean that. 让我知道你的意思。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何为z = f(x,y)绘制平滑的2D颜色图 - How to plot a smooth 2D color plot for z = f(x, y) 来自 x、y、z 值的 matplotlib 2D 图 - matplotlib 2D plot from x,y,z values 如何从matplotlib中的x,y,z坐标绘制等高线图? (plt.contourf或plt.contour) - How to do a contour plot from x,y,z coordinates in matplotlib? (plt.contourf or plt.contour) 给定 x,y,z 坐标的数据,我将如何在 Matplotlib 中制作 3D 表面 plot? - How would I make a 3D surface plot in Matplotlib given this data of x,y,z coordinates? 如何绘制grad(f(x,y))? - How to plot grad(f(x,y))? 如何绘制离散f(x,y)输出 - How to plot discrete f(x,y) output 如何获得轮廓 plot 和 3D plot 使用 z1587383CF8C21507D06FB 的 zDDDA 和 a set5ZEF3 列的起始点来表示? - How can I obtain a contour plot and a 3D plot using Matplotlib starting from a set of 3 columns representing x,y and z points? 如何在python中绘制f(x,y)= sqrt(2x-y) - how to plot in python f(x,y)=sqrt(2x-y) 考虑 F(x,y)=常数。 对于无法分离变量的复杂 F,如何确定所有 y 和 x 以及 plot(y vs x)? - Consider F(x,y)=constant. How to determine all the y and x and plot (y vs x), for complicated F where I can't separate the variables? 如何在现有图上的matplotlib中绘制(x,y)值? - How to plot (x,y) values in matplotlib on an existing plot?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM