Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass{article}
- \usepackage{pgfplots}
- \usepgfplotslibrary{fillbetween}
- \begin{document}
- \begin{figure}[!h]
- \centering
- \begin{tikzpicture}
- \begin{axis}[
- axis x line=center,
- axis y line=center,
- xmin=-0.1,
- xmax=1.1,
- ymin=-0.1,
- ymax=1.1,
- xtick={1},
- ytick={1},
- xlabel=$x$,
- ylabel=$y$,
- x label style={anchor=west},
- y label style={anchor=south}]
- \node[below] at (axis cs:0.02,0){$0$};
- \node[right] at (axis cs:0.75,0.5){$F(x)=x^2$};
- \node[left] at (axis cs:0.45,0.5){$G(x)=x$};
- \addplot[domain=-0.1:1.05, name path=A]{x^2};
- \addplot[domain=-0.1:1.1, name path=B]{x};
- \addplot[gray!50] fill between[of=A and B, soft clip={domain=0:1}];
- \end{axis}
- \end{tikzpicture}
- \end{figure}
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement