2017-05-30 67 views
1

我想從一個文件繪製一個2d pm3d地圖,然後在其上添加一條曲線。我試圖Gnuplot:在pm3d地圖頂部的參數圖

set pm3d map 
set parametric 
fx(t) = r*cos(t) 
fy(t) = r*sin(t) 
plot fx(t),fy(t) w l, 'GapRM.dat' u 1:2:3 w pm3d 

但後來我得到錯誤信息

Too many using specs for this style 

我怎樣才能做到這一點?

回答

0

我發現了一個簡單的方法。在這個例子中,在3d地圖上繪製一個橢圓:

set parametric 
set view map 
set urange [0:6.281] 
set vrange [0:2*pi] 
set xrange [-6:6] 
set yrange [-6:6] 
splot 'file.dat' using 1:2:3 w pm3d, 2*cos(u),3*sin(u),0 ls 1 
1

我不知道你是否可以混合參數與pm3d,但我懷疑(你的例子不工作,因爲你需要一個麻雀使用pm3d)。

我建議繪製一個臨時文件參數化的東西,然後將其加載到pm3d的頂部。

是這樣的:

set table "tmpfile.dat" 
set parametric 
fx(t) = r*cos(t) 
fy(t) = r*sin(t) 
plot fx(t),fy(t) w l 
unset table 
unset parametric 
set pm3d map 
splot x**2 w pm3d, 'tmpfile.dat' u 1:2:(0) w l lc palette