I want to plot two ablines in R, but conditional upon a certain value. The graph I wish to plot has a slope of -1 and intercept y=50, up until the value 50. It then has a slope of 0 and intercept 0 after that for all x. 

The code: 

```
plot.new()
plot.window(xlim=c(0,100),ylim=c(0,100))
abline(a=50,b=-1)
##abline(a=0,b=0)
axis(1)
axis(2)
title(main="Graph")
title(xlab="X")
title(ylab="Y")
box()

```

Using the normal abline I am able to get one or the other, but I'm unsure how to add both in the same graph without any overlap. Please help!