\documentclass[10pt,border=0pt,tikz,class=scrartcl,multi=false]{standalone}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{lmodern}
\usepackage{mathtools,amssymb,gensymb}
\usepackage{pgfplots}
\usepackage{ifthen}
\pgfplotsset{compat=1.10}
\usetikzlibrary{positioning,calc,arrows,fit,backgrounds,decorations.text,shapes,matrix}
\title {Lissajous phase}
\author{Krishnatej Vedala}
\def\amplitude{1}
\newcommand{\LissajousCurve}[1]{
\begin{tikzpicture}[anchor=center]\begin{axis}[draw, axis equal, clip=false,
axis lines=center,
xtick=\empty, ytick=\empty,
xmin=-\amplitude-0.1, ymin=-\amplitude-0.1, xmax=\amplitude+0.1, ymax=\amplitude+0.4,
xlabel={\Large$x(t)$}, ylabel={\Large$y(t)$}]
\addplot[samples=100, domain=0:1, line width=2.5pt, variable=\t, >->] ({\amplitude*sin(deg(2*pi*t))},{\amplitude*sin(deg(2*pi*t)+#1)});
\addplot[black,dotted] coordinates {
(-\amplitude,\amplitude) (\amplitude,\amplitude)
(\amplitude,-\amplitude) (-\amplitude,-\amplitude)
(-\amplitude,\amplitude)};
\end{axis}\end{tikzpicture}
}
\tikzset{
plots/.style = {
inner sep = 0pt,
align = center,
font = \normalsize,
transform shape,
anchor = center,
thick
},
graph/.style = {draw = none, scale = .75},
info/.style = {font = \footnotesize, draw = none}
}
\tikzset{
pics/graph_pic/.style n args = {3}{code={
\node (-g) [scale=.65, plots, graph] {\LissajousCurve{#1}};
\begin{scope}[x=(-g.south west), y=(-g.south), yshift=-6.6em]
\node [plots, info] {
$\underbrace{
\left\{\begin{aligned}
x(t)&=\sin(2\pi t)\\[-5pt]
y(t)&=\sin\left(2\pi t-#2\right)
\end{aligned}\right.}_{
\begin{array}{@{}c@{}}
\delta=#1^\circ\\
\text{#3}
\end{array}}$
};
\node (-c) [fit = (-g.north east), inner sep = 0pt] {};
\end{scope}
}}
}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[thick,auto,>=stealth']
\def\pp{10}
\fill [fill=black!40] (0,0) rectangle (\pp,\pp);
\fill [fill=black!40] (0,0) rectangle (-\pp,-\pp);
\fill [fill=black!10] (0,0) rectangle (-\pp,\pp);
\fill [fill=black!10] (0,0) rectangle (\pp,-\pp);
\draw [decorate, decoration={brace,amplitude=17pt}] (0,\pp) -- node [pos=.5,anchor=south,yshift=15pt] { Positive slope (I \& IV)} (\pp,\pp);
\draw [decorate, decoration={brace,amplitude=17pt}] (-\pp,\pp) -- node [pos=.5,anchor=south,yshift=15pt] { Negative slope (II \& III)} (0,\pp);
\draw [decorate, decoration={brace,amplitude=17pt}] (\pp,\pp) -- node [pos=.5,anchor=south,xshift=15pt,rotate=-90] { Clockwise (I \& II)} (\pp,0);
\draw [decorate, decoration={brace,amplitude=17pt}] (\pp,0) -- node [pos=.5,anchor=south,xshift=15pt,rotate=-90] { Counter clockwise (III \& IV)} (\pp,-\pp);
\node [anchor=north east] at (\pp,\pp) {\Large\textrm I};
\node [anchor=north west] at (-\pp,\pp) {\Large\textup{II}};
\node [anchor=south west] at (-\pp,-\pp) {\Large\textup{III}};
\node [anchor=south east] at (\pp,-\pp) {\Large\textup{IV}};
\foreach[count=\i] \angle/\a/\b/\c in
{-315/7\pi/4/,
-270/3\pi/2/(in ``quadrature''),
-225/5\pi/4/,
-180/\pi//(inverted),
-135/3\pi/4/,
-90/\pi/2/(in ``quadrature''),
-45/\pi/4/,
0/0//(in phase)}{
\ifthenelse{\equal{\angle}{-270}}{\def\len{7.8}}{\def\len{6.8}}
\ifthenelse{\equal{\b}{}}{
\path pic (g-\i) at +(45*\i:\len) {graph_pic={\angle}{\a}{\c}};
}{
\path pic (g-\i) at +(45*\i:\len) {graph_pic={\angle}{\frac{\a}{\b}}{\c}};
}
\ifthenelse{\equal{\angle}{-270}}{
\draw[dashed, semithick] (0,0) -- node [near end, sloped, above]
{\footnotesize$\delta=\angle^\circ$} ($(g-\i-g)-(0,8em)$);
}{
\draw[dashed, semithick] (0,0) -- node [near end, sloped, above]
{\footnotesize$\delta=\angle^\circ$} (g-\i-g);
}
}
\draw [->, semithick, postaction={decorate, decoration={
text along path, text={Increasing phase shift}, text align={center,left indent=3mm},raise=3pt}
}] (1.5,0) arc (0:-315:1.5);
\node [draw=black, thick, dashed, rectangle, rotate=90, align=center, anchor=south] at (-\pp-0.1,0) {\large
LTI Lissajous figures are \textbf{ovals} with \emph{eccentricity} and\\
\emph{direction of rotation} determined by phase shift $\delta$.
};
\end{tikzpicture}
\end{document}