问题
I have made the following script to draw a diagram in gnuplot. There are a few number of points each enclosed within a certain area. I want to give each enclosed region a certain color. My script is as follows:
set terminal wxt
set yrange [0:100]
set xrange [0:100]
unset colorbox
set style arrow 1 nohead lc rgb 'black'
set style arrow 2 nohead lc rgb 'red'
set label 7 "" at 35,80 point pointtype 5 lc rgb 'black'
set label 8 "" at 40,30 point pointtype 5 lc rgb 'black'
set arrow from 77.0522,58.9552 to 56.25,56.875 as 2
set label 5 "" at 10,20 point pointtype 5 lc rgb 'black'
set label 8 "" at 40,30 point pointtype 5 lc rgb 'black'
set arrow from 20.3571,38.9286 to 35,-5 as 2
set label 5 "" at 10,20 point pointtype 5 lc rgb 'black'
set label 6 "" at 25,60 point pointtype 5 lc rgb 'black'
set arrow from -25.625,56.1719 to 20.3571,38.9286 as 2
set label 6 "" at 25,60 point pointtype 5 lc rgb 'black'
set label 7 "" at 35,80 point pointtype 5 lc rgb 'black'
set arrow from 11.3889,79.3056 to 56.25,56.875 as 2
set label 6 "" at 25,60 point pointtype 5 lc rgb 'black'
set label 8 "" at 40,30 point pointtype 5 lc rgb 'black'
set arrow from 56.25,56.875 to 20.3571,38.9286 as 2
set label 1 "" at 100,100 point pointtype 5 lc rgb 'black'
set label 7 "" at 35,80 point pointtype 5 lc rgb 'black'
set arrow from 77.0522,58.9552 to 50,146.875 as 2
set label 1 "" at 100,100 point pointtype 5 lc rgb 'black'
set arrow from 11.3889,79.3056 to -25.625,56.1719 as 2
set label 2 "" at 0,100 point pointtype 5 lc rgb 'black'
set label 4 "" at 0,0 point pointtype 5 lc rgb 'black'
set arrow from -75,50 to -1000,50 as 2
set label 3 "" at 100,0 point pointtype 5 lc rgb 'black'
set label 8 "" at 40,30 point pointtype 5 lc rgb 'black'
set arrow from 50,-25 to 87.5,50 as 2
set label 3 "" at 100,0 point pointtype 5 lc rgb 'black'
set label 1 "" at 100,100 point pointtype 5 lc rgb 'black'
set arrow from 87.5,50 to 1100,50 as 2
set label 4 "" at 0,0 point pointtype 5 lc rgb 'black'
set label 5 "" at 10,20 point pointtype 5 lc rgb 'black'
set arrow from -75,50 to 35,-5 as 2
set label 4 "" at 0,0 point pointtype 5 lc rgb 'black'
set label 8 "" at 40,30 point pointtype 5 lc rgb 'black'
set arrow from 35,-5 to 50,-25 as 2
set label 4 "" at 0,0 point pointtype 5 lc rgb 'black'
set label 3 "" at 100,0 point pointtype 5 lc rgb 'black'
set arrow from 50,-25 to 50,-1000 as 2
plot NaN notitle
Which additional things will I need to add to this script to color each region?
来源:https://stackoverflow.com/questions/40883823/draw-different-colored-regions-in-gnuplot