0

I am using ubuntu 14.04, gnuplot 4.6 patchlevel 4.
I have the following script, named Plot.script:

## GNUPLOT command file
set terminal postscript color
set style data lines
set noxzeroaxis
set noyzeroaxis
set key top spacing .8
set size ratio 0.821894871074622
set noxtics
set noytics
set title 'Combined DET Plot'
set ylabel 'Miss probability (in %)'
set xlabel 'False Alarm probability (in %)'
set grid
set pointsize 3
set ytics (\
    '5' -1.6449, '10' -1.2816, '20' -0.8416, '40' -0.2533, '60' 0.2533, \
    '80' 0.8416, '90' 1.2816, '95' 1.6449, '98' 2.0537)
set xtics (\
    '.0001' -4.7534, '.001' -4.2649, '.004' -3.9444, '.01' -3.7190, '.02' -3.5401, \
    '.05' -3.2905, '.1' -3.0902, '.2' -2.8782, '.5' -2.5758, '1' -2.3263, \
    '2' -2.0537, '5' -1.6449, '10' -1.2816, '20' -0.8416, '40' -0.2533)
plot [-4.75343910607888:-0.253347103317183] [-1.64485362793551:2.05374890849825] \
   -x title 'Random Performance' with lines 1,\
  'tmp/score.det.sub00.dat.1' using 3:2 title 'Term Wtd. fake : ALL Data Max Val=0.267         Scr=0.436' with lines 2,\
  'tmp/score.det.sub00.dat.2' using 6:5 notitle with points 2,\
  'tmp/score.det.sub01.dat.1' using 3:2 title 'Term Wtd. fake: CTS Subset Max Val=0.267     Scr=0.436' with lines 3,\
  'tmp/score.det.sub01.dat.2' using 6:5 notitle with points 3

Then I run gnuplot Plot.script | ps2pdf - .
I get the following error:

line 27: ';' expected

line 27 is the last row of the script:

'tmp/score.det.sub01.dat.2' using 6:5 notitle with points 3

I have searched from web and found this similar question but it doesn't seem to help. Does anyone know what the problem is?

1
  • 1
    Glad your problem is solved, there's no need to mention it in your question though! Commented Aug 7, 2014 at 12:51

2 Answers 2

2

In general it is very hard to debug such a long script, especially without having the test data to run exactly this script. You should start by cutting down your script line by line to track down in which line the error really appears. The whole plot command is treated as a single line, so if it says line 27, the error can also appear earlier.

I guess, that you have the wrong syntax for selecting line types. Using with lines 1 doesn't work, and the simple line

plot x with lines 1

already shows this error. You must use

plot x with lines linetype 1

Accordingly you must fix all other positions where you set a line type (or point type).

Sign up to request clarification or add additional context in comments.

Comments

0
line 27: ';' expected

can mean there's a ',' missing in the plot statement. I couldn't find it myself in your code. May be you need to delete blanks before "Scr=" But I had a similar problem.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.