gnuplot> f(x,a,b)=a<x ? x<b ? x : 0/0 : 0/0
gnuplot> plot [0:1] f(x,0,0.5), f(x,0.5,1)
とか。