Advertisement
makispaiktis

Document 6 - Basics in TikZ (12)

Oct 8th, 2021 (edited)
1,859
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 1.05 KB | None | 0 0
  1. \documentclass{article}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage{amsmath}
  4. \usepackage{amssymb}
  5. \usepackage{tikz}
  6.  
  7. \title{Document 6 - Basics in Tikz (12)}
  8. \author{Thomas Boufikos}
  9. \date{October 2021}
  10.  
  11. \begin{document}
  12.  
  13.    \maketitle
  14.    \section{Making graphs with TikZ} \\ \\ \\
  15.    \begin{center}
  16.        \begin{tikzpicture}
  17.            
  18.            \draw[lightgray, ultra thin] (-4, -1) grid (4, 6);
  19.            \draw[<->] (-4.5, 0) -- (4.5, 0) node[right] {$x$};
  20.            \draw[<->] (0, -1.5) -- (0, 6.5) node[above] {$y$};
  21.            \begin{scope}
  22.                \clip (-4, -1) rectangle (4, 6);
  23.                \draw[blue, smooth, thick, variable=\x, samples=50, domain=-4:4] plot({\x}, {(\x)^2});
  24.            \end{scope}
  25.            \draw[red, fill=red] (2,4) circle [radius=1mm] node [right] {(2,4)};
  26.            \draw[dashed, thin, red] (0,4) node[left] {(0,4)} -| (2,0) node[below] {(2,0)};
  27.            \draw[blue] (-3, 2) node[draw] {$f(x)=x^2$};
  28.            
  29.        \end{tikzpicture}
  30.    \end{center}
  31.    
  32. \end{document}
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement