Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass{standalone}
- \usepackage{pgfplots}
- \pgfplotsset{compat=newest}
- \usepackage{mathtools}
- \newcommand{\LHS}[2][1.5em]{\hspace{#1}\mathllap{#2}}
- \newcommand{\RHS}[2][1.5em]{\hspace{#1}\mathrlap{#2}}
- \begin{document}
- \begin{tikzpicture}
- \begin{axis}[
- legend cell align=left,
- legend style={legend pos=north west}
- ]
- % added colours to plots
- \addplot[blue,domain=0:2] {x^2};
- \addplot[red,domain=0:4] {x};
- \addplot[red,domain=0:4] {x};
- \legend{%
- $\LHS{yy}=x^2$ text,
- $\LHS{zty}=xxxx$ text,
- $\LHS{y}=x$ text,
- }
- \end{axis}
- \end{tikzpicture}
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment