2017-05-23 2 views
1

gnuplot에서 이미지로 플로트하면 설정 한 레이블이 표시되지 않습니다. 그 밖의 모든 것은 정확합니다.Gnuplot : 이미지가있는 그림이 표시 될 때 레이블이 표시되지 않음

#! /bin/sh 
# 
# Plotting the color map of correlation using the default Matlab palette 
# 
gnuplot <<EOF 
reset 
set terminal pngcairo size 700,524 enhanced font 'Verdana,10' 
unset key 
# border 
set style line 11 lc rgb '#808080' lt 1 
set border 3 front ls 11 
set tics nomirror out scale 0.75 

set xrange [0:20] 
set yrange [0:20] 
set xlabel 'Distance x/D_j [-]' 
set ylabel '{/Symbol t} u_j/D_j [-]' 

# disable colorbar tics 
set cbtics scale 0 
# matlab palette colors 
set palette defined (0 "#000090",\ 
         1 "#000fff",\ 
         2 "#0090ff",\ 
         3 "#0fffee",\ 
         4 "#90ff70",\ 
         5 "#ffee00",\ 
         6 "#ff7000",\ 
         7 "#ee0000",\ 
         8 "#7f0000") 

set output 'test.png' 
set label 'aaa' at 2,17 
plot 'Cuup_nf_a090_r050Dj_average' u 1:2:3 with image 
EOF 

어떤 이상한 것은 : 여기 내 코드는 내가 예를 들어, 세 번째 데이터 계열로 존재하지 않는 열을 사용하여 데이터 파일을 플롯 경우 :

plot 'Cuup_nf_a090_r050Dj_average' u 1:2:4 with image 

(내가 가진 'Cuup_nf_a090_r050Dj_average'파일의 3 열만)

이미지에 빈 (데이터 없음)이 표시되지만 라벨이 올바르게 표시됩니다.

그래서 레이블이 내 데이터 팔레트로 덮여있는 것 같습니다. 코드 끝 부분에 'set label'을 넣으려고했으나 작동하지 않습니다.

누군가 아이디어가 있습니까?

추신 : 내의 gnuplot 버전 : 버전 4.6 패치 레벨 4 개

미리 감사.

+1

사용 '설정 라벨 전면 ...' – Christoph

답변

1

레이블에는 앞면 또는 뒷면 레이어에 레이블을 지정하는 옵션 front|back이 있습니다. 명시 적 레이어를 지정하지 레이블 숨겨진되도록 with image을 플롯 할 때 기본 설정은, back입니다 :

$data <<EOD 
1 2 
3 4 
EOD 
set label 'default, hidden' at graph 0.6, graph 0.7 font ",20" 
set label back 'back, hidden' at graph 0.6, graph 0.5 font ",20" 
set label front 'front, visible' at graph 0.6, graph 0.3 font ",20" 

plot $data matrix with image 

enter image description here

+1

너무 감사합니다! 그것은 나를 구해 주었다 ... (추신 : 나는 튜토리얼에서 더 많은 내용을 읽었어야했다.) – user3663889

관련 문제