# How do I mark points on a graph?

I am trying to draw this graph with latex, but I can't find a way to add the B point and the y = x^2 and y = x labels:

I did this:

using this code:

\documentclass[]{book}
\usepackage{systeme, microtype, amsmath, pgfplots, geometry}
\usetikzlibrary{datavisualization}
\usetikzlibrary{datavisualization.formats.functions}
\let\ds\displaystyle
\begin{document}

\tikz[scale=0.75,domain=-0.1:1.1,samples=50]{
\begin{axis}[axis x line=middle, axis y line=middle, stack plots=y]
\addplot+[mark=none, fill=green, fill opacity=0.25] {min(x^2 - (x), 0)} \closedcycle;
\end{axis}
}

\end{document}


Can anyone help me?

I also found the default positions of the x and y axis labels a bit unfortunate so I placed them, more or less, manually. By adjusting the anchors you'll be able to move them around. And I removed all packages that were not necessary.

\documentclass[]{book}
\usepackage{pgfplots,geometry}
\pgfplotsset{compat=1.16}
\begin{document}

\tikz[scale=0.75,domain=-0.1:1.1,samples=50]{
\begin{axis}[axis x line=middle, axis y line=middle, stack plots=y]
\node[circle,fill,scale=0.3,label=right:$B$] at (axis cs:1,1){};
\node[anchor=south west] at (axis cs:0.75,0.5){$y=x^2$};
\node[anchor=south east] at (axis cs:0.5,0.5){$y=x$};
\node[anchor=south east,scale=0.75] at (current axis.right of origin) {$x$};
\node[anchor=north west,scale=0.75] at (current axis.above origin) {$y$};