2012-04-26 5 views

답변

5

하나의 plot 명령에서 두 개의 그림을 두 개의 datafile 인수와 함께 쉼표로 구분하여 얻을 수 있습니다.

enter image description here

+0

예를 들어

plot [-1:5] 'data1.txt' with points, 'data2.txt' with points 

당신이 뭔가를 얻을 것? 나는'plot1 ','data2 'with lines'을 시도했지만 모든 점을 얻었고 점들은 모두 0 축에 있습니다. 라인이있는 – user1224398

+0

은 두 번째 데이터 파일에만 적용됩니다. plot 'data1'라인과 'data2'lines '라인을 사용해보십시오. 'gnuplot'가 같은 디렉토리에서'data2' 파일을 찾을 수없는 것 같습니다. –

+0

나는 또한 plot 'data1', 'data2'with points'를 시도했지만 얻은 것을 얻을 수 없었다. 모든 점은 0 축에 있습니다. 그 이유는 무엇입니까? – user1224398

1

이 나를 위해 작동합니다 : 나는 라인을 어떻게 그려 않습니다

reset 
set term pngcairo 
set output 'wall.png' 
set xlabel "Length (meter)" 
set ylabel "error (meter)" 
set style line 1 lt 1 linecolor rgb "yellow" lw 10 pt 1 
set style line 2 lt 1 linecolor rgb "green" lw 10 pt 1 
set style line 3 lt 1 linecolor rgb "blue" lw 10 pt 1 
set datafile separator "," 
set key 
set auto x 
set xtics 1, 2, 9 
set yrange [2:7] 
set grid 

set label "(Disabled)" at -.8, 1.8 
plot "file1.csv" using 1:2 ls 1 title "one" with lines ,\ 
    "file2.csv" using 1:2 ls 2 title "two" with lines ,\ 
    "file3.csv" using 1:2 ls 3 title "three" with lines 
set output 
관련 문제