Wiki
Clone wikipgffigure / Legends
Minimal example
\begin{axis}[% width = 80mm ,height = 50mm ,xlabel = {Time} ,ylabel = {Production} ,xmin = 0 ,xmax = 5 ,legend entries = {Quadratic, Logarithmic} ,legend style = {legend pos = north west} ] \addplot[red] {x^2}; \addplot[blue] {x*log2(x)}; \end{axis}
Updated