Gnuplot script to output eps or svg - how to write?
Asked Answered
B

1

7

I have the following gnuplot script:

set autoscale
unset log
unset label
set xtic auto
set ytic auto
unset title
set xlabel "Number of clusters"
set ylabel "Accuracy of classifier (%)"
plot "cluster.dat" using 1:3 title "PART" with lines, \
     "cluster.dat" using 1:4 title "JRip" with lines, \
     "cluster.dat" using 1:5 title "FURIA" with lines

I would like this script, when run, to output SVG or EPS - what would I need to add or modify to make this happen?

Binah answered 13/2, 2016 at 21:44 Comment(0)
P
19

In gnuplot the output type is called terminal.

In your script, before the plot command use

set term svg
set output "output.svg"

or

set term eps
set output "output.eps"

both terminals have several options. Type help eps (on some gnuplot this is help epscairo) or help svg.

To get the list of available terminals for your build, type set terminal.

Paymaster answered 13/2, 2016 at 23:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.