gnuplot - Gnuplot : How do I draw a 2d surface on a domain which is not rectangular?

标签 gnuplot

我对 gnu 还很陌生。

我转向了 gnu,因为我无法让 matlab 绘制我的表面。

如何在非矩形值域上绘制二维表面?

例如,我想绘制以下集合

S = {z | x * y^2 =z 使得 x + y <1 且 x > 0 且 y> 0}。

我认为一种解决方案是定义一个函数

f(x,y) := x*y^2 每当 x+y <1, x>0 且 y>0

f(x,y) := 100 否则。

然后我可以简单地将图片限制在我感兴趣的部分。 但是如何定义两个变量的分段函数呢?

始终感谢帮助。 干杯

最佳答案

您必须使用参数模式。这为您提供了矩形 (u, v) 域,您必须对其进行适当转换以获得所需的 (x, y) 域:

set parametric
set urange [0:1]
set vrange [0:1]
set xlabel 'x'
set ylabel 'y'
set view 62,24
set ticslevel 0
splot u, v*(1-u), u*v**2

4.6.3的结果是:

enter image description here

关于gnuplot - Gnuplot : How do I draw a 2d surface on a domain which is not rectangular?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21175201/

相关文章:

bash - 如何使用 system() 从 Perl 调用 gnuplot one-liner?

gnuplot - gnuplot 上的相关系数

gnuplot - 使用 gnuplot every 选项绘制数据的周期性范围

3d - 如何根据点的类别制作 3D 密度图

数据文件中的 GNUPLOT 复数

gnuplot 堆积的填充曲线无法显示正确的总和

loops - gnuplot for 带间隔的循环

gnuplot - 是否可以在 gnuplot 中更改点大小

gnuplot - 同一图表上的多个参数图或参数图和非参数图

gnuplot - 将字体样式定义为变量