Question: Legend in plots

I wonder - would it be possible to automate the following way of adding a legend to plots? If so - how?

plot([f(x), g(x), 7], legend = ['f(x)' = f(x), 'g(x)' = g(x), y = 7]);


In my opinion such a legend makes the plot much more readable - but most students (and others) will usually be too lazy to type this out, hence the wish for it be to automated.

Any help will be much appreciated.

Please Wait...