Guest User

Untitled

a guest
Jul 12th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. \documentclass{standalone}
  2.  
  3. \usepackage{pgfplots}
  4. \pgfplotsset{compat=newest}
  5. \usepackage{mathtools}
  6. \newcommand{\LHS}[2][1.5em]{\hspace{#1}\mathllap{#2}}
  7. \newcommand{\RHS}[2][1.5em]{\hspace{#1}\mathrlap{#2}}
  8.  
  9. \begin{document}
  10.  
  11.  
  12. \begin{tikzpicture}
  13. \begin{axis}[
  14. legend cell align=left,
  15. legend style={legend pos=north west}
  16. ]
  17. % added colours to plots
  18. \addplot[blue,domain=0:2] {x^2};
  19. \addplot[red,domain=0:4] {x};
  20. \addplot[red,domain=0:4] {x};
  21. \legend{%
  22. $\LHS{yy}=x^2$ text,
  23. $\LHS{zty}=xxxx$ text,
  24. $\LHS{y}=x$ text,
  25. }
  26. \end{axis}
  27. \end{tikzpicture}
  28. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment