我在Gnuplot中創建重疊圖,因爲我混合了正常和參數圖(以及pm3d圖和參數曲面)。這主要工作正常,除了一件事:如果兩個地塊都有一個標題,傳說通常重疊。一個典型的例子是這樣的:Gnuplot,Multiplot:將正常和參數圖與單個圖例框混合?
#legends.gp
set term pngcairo enhanced color linewidth 1.5 dashed dashlength 1.4 rounded
set output "legends.png"
set title "legends test"
set multiplot
# make a box around the legend
set key box
set border 15 lw 1
# fix the margins, this is important to ensure alignment of the plots.
set lmargin at screen 0.15
set rmargin at screen 0.98
set tmargin at screen 0.90
set bmargin at screen 0.15
set xlabel "x"
set ylabel "sin(x)"
set xrange[0:2*pi]
set yrange[-1:1]
set grid x y
# add single tic at 0.62
set xtics add ("x0" 0.62)
# main plot command
plot sin(x) title "sinus"
# turn everything off
set format x "" #numbers off
set format y ""
set xlabel "" #label off
set ylabel ""
set border 0 #border off
unset xtics #tics off
unset ytics
unset grid #grid off
unset title #title off
#plot vertical line at 0.62
set parametric
plot 0.62,t ls 2 lw 2 title "parametric Line"
unset parametric
unset multiplot
我的問題是,現在,有一個簡單的,大多是自動的方法來創建多條曲線單一傳奇?
P.S.對不起,我最終讓示例文件比通過展示更多功能更復雜,這對未來的讀者有希望有所幫助。
我一開始並不喜歡這個答案,但是現在我已經使用了'NaN'技巧幾次,它工作得很好。感謝你的回答! – Jost 2012-07-08 17:43:01
+1爲「與gnuplot魔法的樂趣」,我喜歡':)' – Christoph 2013-08-30 08:01:27