plot z=min(x/y*x*0.5, x) x=1..1000 y=1..1000