Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass{article}
- \usepackage[utf8]{inputenc}
- \usepackage{amsmath}
- \usepackage{amssymb}
- \usepackage{tikz}
- \title{Document 6 - Basics in Tikz (12)}
- \author{Thomas Boufikos}
- \date{October 2021}
- \begin{document}
- \maketitle
- \section{Making graphs with TikZ} \\ \\ \\
- \begin{center}
- \begin{tikzpicture}
- \draw[lightgray, ultra thin] (-4, -1) grid (4, 6);
- \draw[<->] (-4.5, 0) -- (4.5, 0) node[right] {$x$};
- \draw[<->] (0, -1.5) -- (0, 6.5) node[above] {$y$};
- \begin{scope}
- \clip (-4, -1) rectangle (4, 6);
- \draw[blue, smooth, thick, variable=\x, samples=50, domain=-4:4] plot({\x}, {(\x)^2});
- \end{scope}
- \draw[red, fill=red] (2,4) circle [radius=1mm] node [right] {(2,4)};
- \draw[dashed, thin, red] (0,4) node[left] {(0,4)} -| (2,0) node[below] {(2,0)};
- \draw[blue] (-3, 2) node[draw] {$f(x)=x^2$};
- \end{tikzpicture}
- \end{center}
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement