\documentclass[tikz,border=5pt]{standalone}
\usepackage{amsmath}
\usepackage{amssymb,amsfonts}
\usepackage{xcolor}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\pgfplotsset{every axis legend/.append style={
cells={anchor=west}}
}
\usepgfplotslibrary{groupplots}
\usetikzlibrary{arrows}
\tikzset{>=stealth'}
\tikzset{every picture/.style={font issue=\footnotesize},
font issue/.style={execute at begin picture={#1\selectfont}}
}
\begin{document}
\begin{tikzpicture}[]
\begin{axis}[
legend pos = {south east},
xlabel = {$x$}
]
\addplot+[
red, mark options={fill=red}
] coordinates {
(0.5, 2.75)
};
\addlegendentry{{}{$g_i(x_{mid}, x_{mid})$}}
\addplot+[
red, mark options={fill=red}
] coordinates {
(0.5, 3.3125)
};
\addlegendentry{{}{$g_i(x_{mid}, \beta) $}}
\addplot+[
blue, mark=none
] coordinates {
(-1.0, -1.0)
(-0.95, -0.8024999999999998)
(-0.9, -0.6099999999999999)
(-0.85, -0.4225000000000003)
(-0.8, -0.2400000000000002)
(-0.75, -0.0625)
(-0.7, 0.11000000000000032)
(-0.65, 0.2775000000000003)
(-0.6, 0.4399999999999995)
(-0.55, 0.5974999999999997)
(-0.5, 0.75)
(-0.45, 0.8975)
(-0.4, 1.0400000000000003)
(-0.35, 1.1774999999999998)
(-0.3, 1.3099999999999998)
(-0.25, 1.4375)
(-0.2, 1.56)
(-0.15, 1.6775000000000002)
(-0.1, 1.7899999999999998)
(-0.05, 1.8975)
(0.0, 2.0)
(0.05, 2.0975)
(0.1, 2.19)
(0.15, 2.2775)
(0.2, 2.36)
(0.25, 2.4375)
(0.3, 2.5100000000000002)
(0.35, 2.5775)
(0.4, 2.64)
(0.45, 2.6975)
(0.5, 2.75)
(0.55, 2.7975)
(0.6, 2.84)
(0.65, 2.8775)
(0.7, 2.91)
(0.75, 2.9375)
(0.8, 2.96)
(0.85, 2.9775)
(0.9, 2.99)
(0.95, 2.9975)
(1.0, 3.0)
(1.05, 2.9975)
(1.1, 2.9899999999999998)
(1.15, 2.9775)
(1.2, 2.96)
(1.25, 2.9375)
(1.3, 2.91)
(1.35, 2.8775)
(1.4, 2.84)
(1.45, 2.7975)
(1.5, 2.75)
(1.55, 2.6975)
(1.6, 2.6399999999999997)
(1.65, 2.5775)
(1.7, 2.5100000000000002)
(1.75, 2.4375)
(1.8, 2.36)
(1.85, 2.2775)
(1.9, 2.1900000000000004)
(1.95, 2.0975)
(2.0, 2.0)
};
\addlegendentry{{}{$f(x)$}}
\addplot+[
solid, red, mark=none
] coordinates {
(-1.0, 1.25)
(-0.95, 1.3)
(-0.9, 1.35)
(-0.85, 1.4)
(-0.8, 1.45)
(-0.75, 1.5)
(-0.7, 1.55)
(-0.65, 1.6)
(-0.6, 1.65)
(-0.55, 1.7)
(-0.5, 1.75)
(-0.45, 1.8)
(-0.4, 1.85)
(-0.35, 1.9)
(-0.3, 1.95)
(-0.25, 2.0)
(-0.2, 2.05)
(-0.15, 2.1)
(-0.1, 2.15)
(-0.05, 2.2)
(0.0, 2.25)
(0.05, 2.3)
(0.1, 2.35)
(0.15, 2.4)
(0.2, 2.45)
(0.25, 2.5)
(0.3, 2.55)
(0.35, 2.6)
(0.4, 2.65)
(0.45, 2.7)
(0.5, 2.75)
(0.55, 2.8)
(0.6, 2.85)
(0.65, 2.9)
(0.7, 2.95)
(0.75, 3.0)
(0.8, 3.05)
(0.85, 3.1)
(0.9, 3.15)
(0.95, 3.2)
(1.0, 3.25)
(1.05, 3.3)
(1.1, 3.35)
(1.15, 3.4)
(1.2, 3.45)
(1.25, 3.5)
(1.3, 3.55)
(1.35, 3.6)
(1.4, 3.65)
(1.45, 3.7)
(1.5, 3.75)
(1.55, 3.8)
(1.6, 3.85)
(1.65, 3.9)
(1.7, 3.95)
(1.75, 4.0)
(1.8, 4.05)
(1.85, 4.1)
(1.9, 4.15)
(1.95, 4.2)
(2.0, 4.25)
};
\addplot+[
dashed, red, mark=none
] coordinates {
(-1.0, -0.4375)
(-0.95, -0.3125)
(-0.9, -0.1875)
(-0.85, -0.0625)
(-0.8, 0.0625)
(-0.75, 0.1875)
(-0.7, 0.3125)
(-0.65, 0.4375)
(-0.6, 0.5625)
(-0.55, 0.6874999999999999)
(-0.5, 0.8125)
(-0.45, 0.9375)
(-0.4, 1.0625)
(-0.35, 1.1875)
(-0.3, 1.3125)
(-0.25, 1.4375)
(-0.2, 1.5625)
(-0.15, 1.6875)
(-0.1, 1.8125)
(-0.05, 1.9375)
(0.0, 2.0625)
(0.05, 2.1875)
(0.1, 2.3125)
(0.15, 2.4375)
(0.2, 2.5625)
(0.25, 2.6875)
(0.3, 2.8125)
(0.35, 2.9375)
(0.4, 3.0625)
(0.45, 3.1875)
(0.5, 3.3125)
(0.55, 3.4375)
(0.6, 3.5625)
(0.65, 3.6875)
(0.7, 3.8125)
(0.75, 3.9375)
(0.8, 4.0625)
(0.85, 4.1875)
(0.9, 4.3125)
(0.95, 4.4375)
(1.0, 4.5625)
(1.05, 4.6875)
(1.1, 4.8125)
(1.15, 4.9375)
(1.2, 5.0625)
(1.25, 5.1875)
(1.3, 5.3125)
(1.35, 5.4375)
(1.4, 5.5625)
(1.45, 5.6875)
(1.5, 5.8125)
(1.55, 5.9375)
(1.6, 6.0625)
(1.65, 6.1875)
(1.7, 6.3125)
(1.75, 6.4375)
(1.8, 6.5625)
(1.85, 6.6875)
(1.9, 6.8125)
(1.95, 6.9375)
(2.0, 7.0625)
};
\end{axis}
\end{tikzpicture}
\end{document}