#!/usr/local/bin/gnuplot -persist set term eps font "arial,12" enhanced size 8.6cm,6cm set output "g2_unc_bounds.eps" set multiplot f(x) = 3+1/(1-2*x) fabove(x) = x < 0.5 ? f(x) : f(0.5) fbelow(x) = x >= 0.5 ? f(x) : 0 gabove(x) = x < 0.5 ? 2*x : f (0.5) gbelow(x) = x >= 1 ? 2*x : fbelow(x) g(x) = x <= 0.5 ? 2*x : 0 ghigh(x) = x >= 1 ? 2*x : 0 set samples 200 set palette defined (0 "white", 1 "red", 2 "black") set colorbox back user origin graph 0, graph 0 size graph 1, graph 1 unset cbtics set xrange[0:3] set yrange[0:6] set xzeroaxis ls -1 set ylabel "g@^{(2)}_{unc}(0)" set xlabel "g@_{mix}^{(2X)}(0)" set style fill pattern 2 set object 1 rect from 0.5,1 to 1,2 fc lt -1 fs solid 0.15 front set object 1 front clip lw 1.0 dashtype "." fc lt -1 fillstyle empty set arrow 5 from 0.5, 1 to 0.5 ,graph 1 nohead lc rgb 'black' dt 1 lw 2 front plot fabove(x) w filledcurves x2 fill pattern 2 lc rgb "grey" notitle, \ fbelow(x) w filledcurves x1 fill pattern 2 lc rgb "grey" notitle, \ gabove(x) w filledcurves x2 fill pattern 2 lc rgb "grey" notitle, \ gbelow(x) w filledcurves x1 fill pattern 2 lc rgb "grey" notitle, \ [0:0.5] g(x) w l lw 2 lc rgb "black" notitle,\ [0.5:] gbelow(x) w l lw 2 lc rgb "black" notitle # f(x) w l lw 2 lc rgb "black" notitle,\ # (18*x -12) w l lw 2 lc rgb "black" notitle set ytics border set xtics border unset object 1 set size 0.35,0.35 set origin 0.25,0.6 unset arrow 5 unset arrow 6 set xrange[0.5:1] set xzeroaxis ls -1 set yrange[1:2] unset ylabel unset xlabel set style fill pattern 2 set xtics (0.5, 0.75 ,1) set ytics (1, 2) # set arrow from 0.5, graph 0 to 0.5, graph 1 nohead lc rgb 'black' dt 2 front # set arrow from 2/3, graph 0 to 2/3, graph 1 nohead lc rgb 'black' dt 2 front plot fabove(x) w filledcurves x2 fill pattern 2 lc rgb "grey" notitle, \ fbelow(x) w filledcurves x1 fill pattern 2 lc rgb "grey" notitle, \ f(x) w l lw 2 lc rgb "black" notitle