선에 다른 기호를 표시하는 범례 / 키를 플로팅하고 싶습니다. 현재 내 플롯은 다음과 같습니다.
불행히도 기호 (삼각형, 직사각형 및 원)는 키 / 범례에 표시되지 않습니다. 어떻게 추가 할 수 있습니까?
다음 gnuplot 스크립트를 사용합니다.
set title tit font "palatino,20"
set xlabel xlbl font "palatino,20"
set ylabel ylbl font "palatino,20"
#set logscale x
set output graphfilename.".pdf"
set terminal pdf
set border linewidth 2
set style line 1 lc rgb '#0060ad' lt 1 lw 2 pt 5 # --- blue
set style line 2 lc rgb '#00ad60' lt 1 lw 2 pt 7 # red .
set style line 3 lc rgb '#ad0000' lt 1 lw 2 pt 9 # green .
set tics scale 0.8
set key below
plot file1 using ($1/1000):($2/1000000):($3/1000000):($4/1000000) notitle w yerrorbars ls 1, \
'' using ($1/1000):($2/1000000) title "Hlog" w lines ls 1,\
file2 using ($1/1000):($2/1000000):($3/1000000):($4/1000000) notitle w yerrorbars ls 2, \
'' using ($1/1000):($2/1000000) title "Iris" w lines ls 2,\
file3 using ($1/1000):($2/1000000):($3/1000000):($4/1000000) notitle w yerrorbars ls 3, \
'' using ($1/1000):($2/1000000) title "Java" w lines ls 3
일반적으로 linespoints
플로팅 스타일로 플로팅 하면 선과 점을 모두 얻을 수 있습니다 .
sc(x) = x*1e-6
plot file1 using ($1/1000):(sc($2)):(sc($3)):(sc($4)) notitle w yerrorbars ls 1 ps 0.5, \
'' using ($1/1000):(sc($2)) title "Hlog" w linespoints ls 1
투명도를 사용하지 않는 한 문제가되지 않습니다. 또한 오차 막대와 함께 그려지는 포인트를 50 %로 줄 였으므로 앤티 앨리어싱에 문제가 발생하지 않습니다.
또 다른 옵션으로 오류 막대에만 제목을 추가 할 수 있습니다.이 경우 범례는 다음과 같습니다 |---x---|
(예 : 오류 막대도 포함됨).
sc(x) = x*1e-6
plot file1 using ($1/1000):(sc($2)):(sc($3)):(sc($4)) title "Hlog" w yerrorbars ls 1, \
'' using ($1/1000):(sc($2)) notitle w lines ls 1
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다