- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
免责声明:我是 Gnuplot 的新手,所以我可能遗漏了一些明显的东西......
对于我必须给出的演示,我正在尝试使用 Gnuplot 创建交互式版本的 this情节。
到目前为止,我已经想出了以下代码:
set hidden3d
set isosamples 40
set border 4095
set xrange [-1 : 5]
set yrange [-3 : 3]
set zrange [-10 : 10]
set xtics 2
set ytics 2
set ztics 2
f(x,y) = x**2 + y**2 * (1 - x)**3
splot f(x,y)
pause -1
然而,在绘图的边界处(具体来说,在相对于 z 轴的边界处)绘图以一种我觉得非常难看的方式被截断;见下文。我想要的基本上是绘制所有线条,就好像我的绘图范围是(例如)-50 : 50
,但最后只有绘图与框的“交集” [-1:5] x [-3:3] x [-10:10]
实际上应该显示。现在似乎正在发生的事情是,任何“绘图段”在由 xrange
-zrange
确定的框外至少有一个点根本不会被绘制。
(How) can I change this?
最佳答案
来自 future 的回答,有点,所以这可能不算...
gnuplot 到 5.2 的版本不能完全按照您的要求进行。但是,只要您使用 pm3d 表面而不是 hidden3d 表面,开发版 5.3 就会默认执行此操作。这是当前开发代码呈现的情节:
set border 4095
unset colorbox
set view 56, 15, .75, 1.75
set samples 40, 40
set isosamples 40, 40
set xyplane 0
set grid x y z vertical
set pm3d depthorder border linewidth 0.100
set pm3d clip z
set pm3d lighting primary 0.8 specular 0.3 spec2 0.3
set xrange [-1 : 5]
set yrange [-3 : 3]
set zrange [-10 : 10]
set xtics 1 offset 0,-0.5
set ytics 1 offset 0,-0.5
set ztics 5
f(x,y) = x**2 + y**2 * (1 - x)**3
splot f(x,y) with pm3d fillcolor "cyan"
关键是命令set pm3d clip z
。这将是 future 版本中的默认设置,但在 5.2 版中不受支持。您可以从 gnuplot.sf.net 上的当前 git 源存储库构建,或等待预计在 2020 年 Spring 发布的 5.4 版。
关于plot - gnuplot - 正确裁剪 3D 图 (splot),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59072863/
我正在尝试使用以下代码绘制两个二维标量,一个作为热图,一个作为叠加轮廓: set contour base set cntrparam levels incremental 0,0.25,1.25 u
我有一个包含 4 列数据的数据文件,前三列指定一个点 (x,y,z),第四列是 1、2 或 3 - 我希望该点根据第四列(即,如果是 2,则将点着色为红色,如果是 3,则为绿色,如果是 1,则为蓝色)
我的印象是在点之间引入一条空线会产生不连续的图。 如果文件 Box.dat 包含以下内容,我预计会出现两个断开的线段。但是我在 z 平面上得到一个正方形。如何让 gnuplot 只连接未被换行符分隔的
我正在绘制一个 3D“栅栏图”,每个栅栏有多种颜色。我的示例数据可以在这里找到: https://gist.github.com/anonymous/a926221ea96e92e86332 我使用以
是否可以将黑色矩形(在 z = 0 平面中)添加到 gnuplot 中的一个点?我试过绘图: splot 0 在调整范围和 pm3d 选项时导致(使用不同的参数)各种不同的颜色。我确实找到了在 2d
免责声明:我是 Gnuplot 的新手,所以我可能遗漏了一些明显的东西...... 对于我必须给出的演示,我正在尝试使用 Gnuplot 创建交互式版本的 this情节。 到目前为止,我已经想出了以下
我有一个 gnuplot 脚本,它从数据生成一个表面图。我对 z 轴进行了对数缩放,例如在 gnuplot.info 上的示例中1 - 就像在示例中一样,我在情节的“底部”有很多空房间。 在该示例中,
如何在具有这种数据结构的 Gnuplot 中绘制(3D 绘图)矩阵。我找不到将第一行和第一列用作 x 和 y 刻度的方法(或忽略它们) ,5,6,7,8 1,-6.20,-6.35,-6.59,-6.
我是一名优秀的程序员,十分优秀!