Dataset 在同一图形上设置/取消设置dgrid3d

Dataset 在同一图形上设置/取消设置dgrid3d,dataset,plot,gnuplot,interpolation,points,Dataset,Plot,Gnuplot,Interpolation,Points,我想在同一个3d图形上绘制两个不同的数据集。这可以很容易地用计算机完成 splot 'foo.dat','bar.dat' 不幸的是,我希望foo平滑,因此我使用dgrid3d设置网格。同时,我想bar只显示点(foo实际上是bar的插值,我想绘制结)。所以我用 set dgrid3d 20,20 splot 'foo.dat' w l, 'bar.dat' w points 不幸的是,这将dgrid3d应用于两个数据集。。。是否可以在splot命令中取消设置dgrid3d,或者使用另一个技

我想在同一个3d图形上绘制两个不同的数据集。这可以很容易地用计算机完成

splot 'foo.dat','bar.dat'
不幸的是,我希望
foo
平滑,因此我使用
dgrid3d
设置网格。同时,我想
bar
只显示点(
foo
实际上是
bar
的插值,我想绘制结)。所以我用

set dgrid3d 20,20
splot 'foo.dat' w l, 'bar.dat' w points

不幸的是,这将
dgrid3d
应用于两个数据集。。。是否可以在
splot
命令中取消设置
dgrid3d
,或者使用另一个技巧解决此问题?

您需要另一个技巧。这个技巧就是设置表格

set terminal push           #save terminal info
set terminal unknown        #null terminal
set table 'foo_gridded.dat' #temporary file to store the data
set dgrid3d 20,20   
splot 'foo.dat'
unset table                 #close temporary file
unset dgrid3d
set terminal pop            #restore terminal info
splot 'foo_gridded.dat' w l, 'bar.dat' w points  #make the plot we want
!rm foo_gridded.dat         #Optional, remove temporary file (Only works on Unix-like systems)

set table基本上将数据“打印”到文本文件中,该文件的格式为gnuplot读回。它非常有用,最后,我认为它的目的是创建各种(丑陋的)小黑客,比如上面的一个,这样gnuplot开发者就不必担心情节类型冲突。(我用这个在pm3d地图上绘制等高线)。

你需要另一个技巧。这个技巧就是设置表格

set terminal push           #save terminal info
set terminal unknown        #null terminal
set table 'foo_gridded.dat' #temporary file to store the data
set dgrid3d 20,20   
splot 'foo.dat'
unset table                 #close temporary file
unset dgrid3d
set terminal pop            #restore terminal info
splot 'foo_gridded.dat' w l, 'bar.dat' w points  #make the plot we want
!rm foo_gridded.dat         #Optional, remove temporary file (Only works on Unix-like systems)

set table基本上将数据“打印”到文本文件中,该文件的格式为gnuplot读回。它非常有用,最后,我认为它的目的是创建各种(丑陋的)小黑客,比如上面的一个,这样gnuplot开发者就不必担心情节类型冲突。(我用这个在pm3d地图上绘制等高线)。

@vanna:没问题。我再怎么强调也不为过,在你的脑海里记住这个把戏是多么有用。(如果你回顾一下我在gnuplot上回答的帖子,可能五分之一只是这个技巧的变体)。@vanna:没问题。我再怎么强调也不为过,在你的脑海里记住这个把戏是多么有用。(如果你回顾一下我在gnuplot上回答的帖子,可能五分之一只是这个技巧的一个变体)。