I added a graph to my guided notes for students that just won't work. Here is my MWE
Code: Select all
Code, edit and compile here:
\documentclass{standalone}\usepackage{pgfplots}\pgfplotsset{compat=newest}\usepgfplotslibrary{fillbetween}\usetikzlibrary{arrows.meta}\begin{document}\begin{tikzpicture}\begin{axis}[axis x line = center,axis y line = center,xmin = -5, xmax = 5,ymin = -2 , ymax =7,xlabel={\(x\)},ylabel={\(y\)},xlabel style={above right},ylabel style={above right},axis line style={- latex[round],thick},xtick distance=1,ytick distance=1,xticklabel style={font=\footnotesize},tick label style={xshift=-0.2em},tick style={major tick length=3mm,thick,color=black},yticklabel style={font=\footnotesize},]\addplot[name path=f,thick,domain=-4:4,smooth]{-.5*x^2+6};\addplot[name path=g,thick,domain=-4:4,smooth]{x^2};\addplot[blue,opacity=0.25]fill between[of=f and g,soft clip={domain=-2:2}];\end{axis}\end{tikzpicture}\end{document}