Convex Function

convex

Edit and compile if you like:

\documentclass{standalone}

\usepackage{pgfplots}
\pgfplotsset{compat=newest}

\begin{document}
\begin{tikzpicture}
  \begin{axis}[
      domain=0:2.7,
      xlabel=$x$,
      smooth,thick,
      axis lines=center,
      every tick/.style={thick},
      legend style={cells={anchor=west}},
      legend pos=north west]

    \addplot[color=blue]{x*ln(x)};

    \addplot[color=red]{x-1};

    \legend{$x \, \ln(x)$,$x-1$}

  \end{axis}
\end{tikzpicture}
\end{document}

Click to download: convex.tex
Open in Overleaf: convex.tex
This file is available on tikz.netlify.app and on GitHub and is MIT licensed.
See more on the author page of Janosh Riebesell..

Leave a Reply

Your email address will not be published.