Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gnuplot script to output eps or svg - how to write?

Tags:

svg

gnuplot

eps

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?

like image 908
Koz Ross Avatar asked Dec 18 '22 19:12

Koz Ross


1 Answers

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.

like image 195
bibi Avatar answered Mar 05 '23 21:03

bibi