\documentclass[border=4pt]{standalone}
\usepackage{ga}
\input{../ee410.tikz}
\begin{document}
\begin{tikzpicture}
\begin{axis}[sig, width=9.5cm, height=4.2cm, xmin=-8.6, xmax=8.6, ymin=-1.6, ymax=1.7,
    xlabel={$t$}, ylabel={$x(t)$},
    xtick={-3.14159,-1.5708,1.5708,3.14159}, xticklabels={,,,},
    ytick={-1,1}, xticklabel style={yshift=-1pt, fill=white, inner sep=1pt},
    yticklabel style={fill=white, inner sep=1pt}, axis on top]
  \draw[dim, dashed] (axis cs:-3.14159,-1.5) -- (axis cs:-3.14159,1.5);
  \draw[dim, dashed] (axis cs:3.14159,-1.5) -- (axis cs:3.14159,1.5);
  \addplot[gaaccent, line width=1.1pt] coordinates {
    (-7.854,0) (-7.854,1) (-4.712,1) (-4.712,-1) (-1.5708,-1) (-1.5708,1) (1.5708,1) (1.5708,-1)
    (4.712,-1) (4.712,1) (7.854,1) (7.854,0)};
  \node[font=\small, anchor=north east, inner sep=2pt] at (axis cs:-1.5708,0) {$-\frac{\pi}{2}$};
  \node[font=\small, anchor=north west, inner sep=2pt] at (axis cs:1.5708,0) {$\frac{\pi}{2}$};
  \node[font=\small, anchor=south, fill=white, inner sep=1pt] at (axis cs:-3.14159,0.12) {$-\pi$};
  \node[font=\small, anchor=south, fill=white, inner sep=1pt] at (axis cs:3.14159,0.12) {$\pi$};
  \node[note, anchor=west] at (axis cs:4.6,1.45) {square wave};
\end{axis}
\end{tikzpicture}
\end{document}
