quadratic-function.tex 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. \documentclass[varwidth=true, border=2pt]{standalone}
  2. \usepackage{pgfplots}
  3. \usepackage{tikz}
  4. \usepackage{helvet}
  5. \usepackage[eulergreek]{sansmath}
  6. \pgfplotsset{
  7. tick label style = {font=\sansmath\sffamily},
  8. every axis label/.append style={font=\sffamily\footnotesize},
  9. }
  10. \begin{document}
  11. \begin{tikzpicture}
  12. \begin{axis}[
  13. % legend pos=south west,
  14. axis x line=middle,
  15. axis y line=middle,
  16. % grid = major,
  17. width=10cm,
  18. height=6.4cm,
  19. % grid style={dashed, gray!30},
  20. xmin=-6, % start the diagram at this x-coordinate
  21. xmax= 6, % end the diagram at this x-coordinate
  22. ymin=-0.25, % start the diagram at this y-coordinate
  23. ymax= 36, % end the diagram at this y-coordinate
  24. % axis background/.style={fill=white},
  25. xtick = {-6, -4,..., 6},
  26. ytick = {0, 5,..., 35},
  27. tick align=outside,
  28. enlargelimits=true,
  29. tension=0.08]
  30. \addplot[domain=-6:6, red, thick,samples=200] {x*x};
  31. \end{axis}
  32. \end{tikzpicture}
  33. \end{document}