|
#
# Illustrate use of concave hull to demarcate overlapping clusters
#
if (!strstrt(GPVAL_COMPILE_OPTIONS, "+CHI_SHAPES")) {
print "This copy of gnuplot does not support concave hulls"
exit # return to caller
}
set title "{/:Bold RA Fisher's iris data set}"
set title offset 0, -2
species(name) = strstrt(name,"setosa") ? 1 \
: strstrt(name,"versicolor") ? 2 \
: strstrt(name,"virginica") ? 3 \
: 0
set datafile separator comma
set datafile columnhead
set key title "Iris Species" font ":Bold"
set key outside top right offset screen -0.3, -.2
set key invert reverse Left
set border 3
set tics nomirror
set offset 0.5, 0.5, 0.5, 0.5
set xtics rangelimit
set ytics rangelimit
set xlabel "Sepal Width"
set ylabel "Petal Length"
set size square
plot 'iris.dat' using 2:3:(species(strcol(5))) with points lc variable notitle, \
keyentry with point pt 7 lc species("setosa") title "setosa", \
keyentry with point pt 7 lc species("versicolor") title "versicolor", \
keyentry with point pt 7 lc species("virginica") title "virginica"
Click here for minimal script to generate this plot
|