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 dir='/Users/daniela/Desktop/scenario_001/outab_beam_170/' id1='LSM' id2='170' fn='f7_'.id1.'_t'.id2.'.txt' lab1=id1 lab2='t='.id2.'s' xi=15; xa=25 yi=20; ya=65 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'" i0=30 di=2 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 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 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 |}J_{cd}{/Symbol |} (kA/m^2/MW)" offset 0,0 set clabel set cntrparam levels incremental -i0,di/5.,i0 splot dir.fn u 1:2:($4>=0.95? abs(1000*$5):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 splot dir.fn u 1:2:($4>=0.95? abs(1000*$5):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 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