gray/scripts/icd-cnt.gnu

104 lines
2.8 KiB
Plaintext
Raw Permalink Normal View History

reset
set style increment default
set term aqua 1 size 600,750 font "Helvetica, 20" enhanced
set macro
set view map
set size noratio
unset key
unset surface
unset hidden
set contour base
set isosamples 200,200
2012-07-13 18:24:30 +02:00
dir='/Users/daniela/Desktop/scenario_001/outab/'
id1='LSM'
id2='520'
fn='f7_'.id1.'_t'.id2.'.txt'
lab1=id1
2012-07-13 18:24:30 +02:00
lab2='t='.id2.'s'
2012-07-13 18:24:30 +02:00
xi=16; xa=26
yi=20; ya=70
xl = xi + 0.1*(xa - xi); xh = xa - 0.1*(xa-xi);
yl = yi + 0.1*(ya - yi); yh = ya - 0.1*(ya-yi);
xtoy = (xa-xi) / (ya-yi)
x0 = xi - (xa-xi); y0 = yi - (ya-yi)
eps = 0.05
g(x,y)=(((x > xl && x < xh && y > yl && y < yh) ? (x0 = x, y0 = y) : 1), 1/0)
f(x,y) = ((x-x0)*(x-x0)+(y-y0)*(y-y0)*xtoy*xtoy > eps ? y : 1/0)
lab(x,y) = ( (x == x0 && y == y0) ? stringcolumn(3) : "")
ZERO = "x0 = xi - (xa-xi), y0 = yi - (ya-yi), b = b+1"
SEARCH = "filecontour index b using 1:(g($1,$2))"
PLOT = "filecontour index b using 1:(f($1,$2)) w l lt 1 lc rgb 'black' lw 2"
LABEL = "filecontour index b using 1:2:(lab($1,$2)) with labels font 'Helvetica, 16'"
2012-07-13 18:24:30 +02:00
i0=25
di=2.5
imax=i0
set xrange [xi:xa]
set yrange [yi:ya] reverse
set zrange [0:imax]
set cbrange [0:imax]
set palette defined (0 'black', 1 'red', 2 'orange', 3 'yellow', 4 'web-green', 5 'cyan', 6 'blue', 7 'violet') negative
set cntrparam levels incremental 0,0.2,1.0
filecontour = "contours.dat"
set table filecontour
2012-07-13 18:24:30 +02:00
splot dir.fn u 1:2:($4>=0.95 ?$8:1/0)
unset table
set lmargin at screen 0.15
set rmargin at screen 0.76
set bmargin at screen 0.12
set tmargin at screen 0.90
set multiplot
unset border
set xtics offset 0,0.3
#set xlabel "{/Symbol b} (º)" offset 0,0.8
2012-07-13 18:24:30 +02:00
set xlabel "{/Symbol b} (º)" offset 0,0.8
set ytics offset 0,0
set ylabel "{/Symbol a} (º)" offset 0,0
set colorbox user origin 0.80,0.12 size 0.05,0.78 vertical
set cbtics di offset 0,0
set mcbtics 2
set cblabel "{/Symbol |}I_{cd}{/Symbol |} (kA/MW)" offset 0,0
set clabel
set cntrparam levels incremental -i0,di/5.,i0
2012-07-13 18:24:30 +02:00
splot dir.fn u 1:2:($4>=0.95? abs($3):1/0) w l lt 1 lc palette lw 1
unset xtics; unset mxtics; unset xlabel
unset ytics; unset mytics; unset ylabel
unset colorbox
set cntrparam levels incremental -i0,di,i0
set border
2012-07-13 18:24:30 +02:00
splot dir.fn u 1:2:($4>=0.95? abs($3):1/0) w l lt 1 lc palette lw 2
filecontour = "contours.dat"
b = 0
plot \
@SEARCH, @PLOT, @LABEL, @ZERO, \
@SEARCH, @PLOT, @LABEL, @ZERO, \
@SEARCH, @PLOT, @LABEL, @ZERO, \
@SEARCH, @PLOT, @LABEL, @ZERO, \
@SEARCH, @PLOT, @LABEL, @ZERO, \
@SEARCH, @PLOT, @LABEL, @ZERO, \
@SEARCH, @PLOT, @LABEL, @ZERO, \
@SEARCH, @PLOT, @LABEL, @ZERO, \
@SEARCH, @PLOT, @LABEL, @ZERO, \
@SEARCH, @PLOT, @LABEL
set cntrparam levels discrete 0.05,0.1,0.15,0.25,0.3,0.35,0.45,0.5,0.55,0.65,0.7,0.75,0.85,0.9,0.95
unset clabel
set border
set label 1 lab1 left at screen 0.15,0.94
set label 2 lab2 right at screen 0.76,0.94
2012-07-13 18:24:30 +02:00
splot dir.fn u 1:2:($4>=0.95 ?$8:1/0) w l lt 1 lc rgb 'black' lw 1
unset label 1
unset label 2
unset multiplot