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. 미안하지만, 필자는 예제 파일을 좀 더 복잡하게 만들었습니다. 더 복잡한 기능을 보여줌으로써 미래의 독자들에게 도움이 될 것입니다.
처음에는이 답변을 좋아하지 않았지만 이제는 NaN 트릭을 몇 번 사용해 보았습니다. 답변 해주셔서 감사합니다! – Jost
+1 "재미있는 gnuplot 마법", 나는 그것을 좋아한다':)' – Christoph