# Recreate this graph of $2\sin(x)+1$

I have been trying to create this graph with pgfplots and tikz.

I have most of it down but I cannot seem to get the axes centered like they are shown in the picture and have the tick labels on the sides like a boxplot as well as the labels only at intervals of $\pi$ on the x axis.

The code below gives me the pictured result below:

    \documentclass[tikz]{standalone}
\usetikzlibrary{arrows.meta}
\usepackage{pgfplots} \pgfplotsset{compat=1.12}

\begin{document}
\begin{tikzpicture}[>=Stealth]
\begin{axis}
[
grid=major,
axis lines = center,
xmin=-2*pi-0.5, xmax=3*pi+0.5,
ymin=-2, ymax=3,
xlabel=$x$, ylabel=$y$,
domain= -2*pi:3*pi
]
\plot[smooth, samples=200, thick, color=blue, <->  ]{2*sin(deg(x))+1}; %deg() used to convert radians to degrees since pgfplots wnats degrees
\end{axis}
\end{tikzpicture}
\end{document}


Like this?

    \documentclass[border=3mm]{standalone}% <--- changed
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
\usetikzlibrary{arrows.meta}

\begin{document}
\begin{tikzpicture}[>=Stealth]
\begin{axis}
[
outer axis line style={draw=gray!50},% <-- added
grid,
xmin=-2*pi-0.5, xmax=3*pi+0.5,
xticklabels={$-2\pi$,$-\pi$,0,$\pi$,$2\pi$,$3\pi$},% <-- added
ymin=-2, ymax=3,
xlabel=$x$, ylabel=$y$,
domain= -2*pi:3*pi
]
\addplot[smooth, samples=200, thick, color=blue, <->  ]{2*sin(deg(x))+1}; %deg() used to convert radians to degrees since pgfplots wnats degrees