\documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} \begin{axis}[ domain=0:1, xlabel=$x$, smooth, thick, axis lines=left, every tick/.style={thick}, legend style={cells={anchor=west}}, legend pos=north west] \addplot[color=blue]{x}; \addplot[color=red]{-x*ln(x)}; \legend{$x$,$-x \, \ln(x)$} \end{axis} \end{tikzpicture} \end{document}