plot x<5?0:x<=10?x:1
だけど
plot x<5?0:x<=10?x/5-1:1
だと思う
意味がわからなかったら三項演算子でググれ