Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass[10pt,a4paper]{article}
- \usepackage[hmargin=3cm,vmargin=2cm]{geometry}
- \usepackage{tikz}
- \usepackage{pgfplots}
- \begin{document}
- \begin{figure}[h!tbp]
- \centering
- \begin{tikzpicture}
- \begin{axis}[
- scale only axis,
- grid=major,
- grid style={dashed, gray!35},
- axis lines=middle,
- inner axis line style={=>},
- xlabel={\large $x$},
- ylabel={\large $y$},
- ytick={-3,-2,...,4},
- xticklabel style={anchor=north west},
- xtick={-3,-2,...,7},
- ymin=-3.5,
- ymax=4.8,
- xmin=-3.5,
- xmax=7.6,
- ]
- \addplot[color=red,thick,samples=50] {0.5*x^2-2*x};
- \addplot [only marks,fill=blue] coordinates {(0,0) (4,0)};
- \addplot [only marks,fill=green] coordinates {(2,-2)};
- \end{axis}
- \end{tikzpicture}
- \end{figure}
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement