gnuplot - 0행: 예상치 못한 또는 인식할 수 없는 토큰

gnuplot - 0행: 예상치 못한 또는 인식할 수 없는 토큰

암호:

#!/usr/bin/env bash
# download death data
wget -O Deaths.txt http://www.randomservices.org/random/data/Deaths.txt
wget -O Pumps.txt http://www.randomservices.org/random/data/Pumps.txt
# Delete the first line
sed 1d Deaths.txt > tempfile1
sed 1d Pumps.txt > tempfile2
# mv tempfile1 Deaths.txt
# mv tempfile2 Pumps.txt
gnuplot -persist -e "set terminal canvas;set xlabel 'x' font 'sans,15';
set ylabel 'y' font ',15';
set title 'Relationship between Deaths and Pumps' font 'sans, 20';
show title;
set label "Most of the deaths is near the pump located in 12.6,11.7" at 16,16;
show label;
set output 'death_pump_relation.html';
plot 'Pumps.txt' with points pt 7 ,'Deaths.txt' with dots;"

오류가 있습니다:line 0: unexpected or unrecognized token

아무런 출력도 얻을 수 없습니다

하지만 사실 내 스크립트에는 line0이 없습니다.

이게 무슨 문제야?

버전: gnuplot V5.2

시스템: MacOS

답변1

이것은 작업 스크립트입니다

#!/usr/bin/env bash
# download death data
wget -O Deaths.txt http://www.randomservices.org/random/data/Deaths.txt
wget -O Pumps.txt http://www.randomservices.org/random/data/Pumps.txt
# Delete the first line
sed 1d Deaths.txt > tempfile1
sed 1d Pumps.txt > tempfile2
mv tempfile1 Deaths.txt
mv tempfile2 Pumps.txt
gnuplot -persist -e "set terminal canvas;set xlabel 'x' font 'sans,15';
set ylabel 'y' font ',15';
set title 'Relationship between Deaths and Pumps' font 'sans, 20';
show title;
set label 'Most of the deaths is near the pump located in 12.6,11.7' at 16,16;
show label;
set output 'death_pump_relation.html';
plot 'Pumps.txt' with points pt 7 ,'Deaths.txt' with dots;"

출력은 Death_pump_relation.html에 있습니다.

답변2

무슨 문제인지 알아

# mv tempfile1 Deaths.txt
# mv tempfile2 Pumps.txt

비판받아서는 안 된다

관련 정보