I have an ECDF plot I’ve created with R and it has a legend in the bottom right hand corner. The problem I’m having is that the faint grey dashed horizontal line that the ECDF plot places at 0.0 is overlapping the last item in my legend. Like so:

At the moment I’m creating the legend with:
legend("bottomright",c("Original","Minus 30 minutes"),col=c("black","red"),lty=c("dashed","dotted"))
Is there a way to simply push the legend up a little to avoid the overlap problem? An ideal solution would be one that programatically detects the overlap and corrects for it appropriately, but failing this, some empirically determined number of pixels offset would probably suffice.
You probably want to use
inset=c(0,.01)(or some other value) in your call to legend