Guest User

Untitled

a guest
Jul 10th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. \documentclass{standalone}
  2.  
  3. \usepackage{pgfplots}
  4. \pgfplotsset{compat=newest}
  5. \usepackage{amsmath}
  6.  
  7. \begin{document}
  8.  
  9.  
  10. \begin{tikzpicture}
  11. \begin{axis}[
  12. legend cell align=left,
  13. legend style={legend pos=north west}
  14. ]
  15. % added colours to plots
  16. \addplot[blue,domain=0:2] {x^2};
  17. \addplot[red,domain=0:4] {x};
  18. \addplot[orange,domain=0:4]{4-x};
  19. \legend{
  20. $\begin{aligned}[t]
  21. yy&=x^2\\[-2pt]
  22. y&=x\\
  23. yyy&=4-x
  24. \end{aligned}$,
  25. \strut % second legend entry
  26. }
  27. \end{axis}
  28. \end{tikzpicture}
  29. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment