The legend is not displayed in the plot, because there is no aesthetics matched with the line. In principle, ggplot sees no reason to add a legend, since there is only one line.
:
ggplot(mtcars, aes(x=mpg, y=wt, lty = 'MyLegend')) + geom_line()

?scale_linetype , .
, + scale_linetype('MyLegendTitle') .