%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -*- Mode: Latex -*- %%%%%%%%%%%%%%%%%%%%%%%%%%
%% pst-osci.doc --- Documentation for `pst-osci' PSTricks package
%%
%% Authors         : Manuel LUQUE <Mluque5130@aol.com>
%%                   Christophe JORSSEN <Christophe.Jorssen@wanadoo.fr>
%% Created         : Thu 2 Sept 1999
%% Last mod. by    : Christophe JORSSEN <Christophe.Jorssen@wanadoo.fr>
%% Last mod. the   : Wed 17 Nov 1999
%% Last mod. by    : Herbert Voss
%% Last mod. the   : 4 Nov 2023
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\PassOptionsToPackage{x11names,dvipsnames,svgnames}{xcolor}
\documentclass[11pt,english,bibliography=totoc,parskip=false,headings=small,
    headinclude=false,footinclude=false,twoside,english,usegeometry]{pst-doc}

%\newgeometry{lmargin=2cm, rmargin=1.5cm}
\usepackage{pst-osci,multicol}    % PSTricks package for Oscilloscope screen shots
\usepackage{enumitem,showexpl,fancyvrb} % Example environments with `fancyvrb'
\setlist{nosep}
\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}}

\newcommand\OsciPackage{\texttt{pst-osci}}
\let\phi\varphi


\def\bgImage{%
\psscalebox{0.75}{\Oscillo[amplitude1=1.5,amplitude2=1.5,offset1=1.5,offset2=-1.5]}}
%\lstset{explpreset={pos=l,width=-99pt,overhang=0pt,hsep=\columnsep,vsep=\bigskipamount,rframe={}},
%    escapechar=?}

\begin{document}

\title{pst-osci}
\subtitle{A PSTricks package for oscilloscopes}
\author{Manuel Luque\\Christophe Jorssen} 
\docauthor{Manuel Luque\\Christophe Jorssen\\Raoul Hatterer\\Herbert Voß}
\date{\today}
\settitle


\tableofcontents


%PSTricks is PostScript and cannot be run directly with pdf\TeX/pdf\LaTeX. Use insted the sequence
%\texttt{latex}$\rightarrow$\texttt{dvips}$\rightarrow$\texttt{ps2pdf} or alternatively \texttt{lualatex}.
%For the latter the package \texttt{luapstricks} is automatically be loaded and the PDF is created
%without any additional program.


\begin{abstract}
\OsciPackage{} is a PSTricks package to draw easily
oscilloscope screen shots. Three channels can be used to represent the most common
signals (damped or not): namely sinusoidal ($y=A\exp (-\lambda t)\sin
(\frac{2\pi}{T}t+m\cdot\sin(\frac{2\pi}{T_m}t)+\phi) + c$), rectangular, triangular,
dog's tooth (left and right oriented). The third channel allows you to add, to
subtract or to multiply the two other signals. \textsc{Lissajous} diagrams (XY-mode)
can also be obtained.
\end{abstract}

\vfill
Thanks to Denis Girou for his most valuable
help and his encouragements.
\newpage

\section{Introduction}

\OsciPackage{} offers a unique macro with few parameters to interact on it (it is
the same approach as in Denis \textsc{Girou}'s \textbf{`pst-poly'} package).
\par
The syntax is simply: \fbox{\cs{Oscillo}\texttt{[optional\_parameters]}}.
\par
\textbf{As for a real oscilloscope, it is important to choose the correct sensivity
for each channel in relation to the amplitude of the signal. If you did the wrong
choice, you will get bad-looking curves.}
\par
The style of the curves can be customized using the standard PSTricks parameters.

\section{Usage}

\subsection{Parameters}

\setlist[description]{font=\normalfont\ttfamily}%


There are thirty specific parameters defined to change the way the screen shots are
drawn.
Henceforth, the signals represented on channels A, B and C will be called `SignalA',
`SignalB' and `SignalC'.
\begin{description}

\item[\texttt{period1} (real):] period $T_1$ (in ms) of SignalA (\emph{default:~20}).

\item[\texttt{period2} (real):] period $T_2$ (in ms) of SignalB (\emph{default:~20}).

\item[\texttt{amplitude1} (real):] amplitude $A_1$ (in V) of SignalA (\emph{default:~2}).

\item[\texttt{amplitude2} (real):] amplitude $A_2$ (in V) of SignalB
(\emph{default:~0 -- no signal}).

\item[\texttt{periodmodulation1} (real):] period $T_{m1}$ (in ms) of SignalA
(\emph{default:~100}).

\item[\texttt{periodmodulation2} (real):] period $T_{m2}$ (in ms) of SignalB
(\emph{default:~100}).

\item[\texttt{freqmod1} (real):] modulation factor $m_1$ of SignalA (\emph{default:~0}).

\item[\texttt{freqmod2} (real):] modulation factor $m_2$ of SignalB (\emph{default:~0}).

\item[\texttt{phase1} (real):] phase $\phi_1$ (in deg) of SignalA (\emph{default:~0}).

\item[\texttt{phase2} (real):] phase $\phi_2$ (in deg) of SignalB (\emph{default:~0}).

\item[\texttt{CC1} (real):] continuous component $c_1$ (in V) of SignalA (\emph{default:~0}).

\item[\texttt{CC2} (real):] continuous component $c_2$ (in V) of SignalB (\emph{default:~0}).

\item[\texttt{damping1} (real):] damping $\lambda_1$ of SignalA
(\emph{default:~0 -- no damping}).

\item[\texttt{damping2} (real):] damping $\lambda_2$ of SignalB
(\emph{default:~0 -- no damping}).

\item[\texttt{wave1}:] type of the SignalA chosen between \cs{SinusA}, \cs{RectangleA},
\cs{TriangleA}, \cs{LDogToothA}, \cs{RDogToothA} (\emph{default: \cs{SinusA}}).

\item[\texttt{wave2}:] type of the SignalB chosen between \cs{SinusB}, \cs{RectangleB},
\cs{TriangleB}, \cs{LDogToothB}, \cs{RDogToothB} (\emph{default: \cs{SinusB}}).

\item[\texttt{timediv} (real):] scale (in ms) of the time axis (\emph{default:~5}).

\item[\texttt{Lissajous} (boolean):] switch to XY-mode (true) or not (false)
(\emph{default: false}).

\item[\texttt{sensivity1} (real):] scale (in V) of the channel A vertical axis
(\emph{default:~1}).

\item[\texttt{sensivity2} (real):] scale (in V) of the channel B vertical axis
(\emph{default:~1}).

\item[\texttt{plotstyle1}:] determines what kind of plot you will get for
channel A (\emph{default: GreenContA}). Note that you can customize the plotstyle
using the \cs{newpsstyle} macro (see below for examples).

\item[\texttt{plotstyle2}:] determines what kind of plot you will get for
channel B (\emph{default: BlueContB}). Same remark as above.

\item[\texttt{plotstyle3}:] determines what kind of plot you will get for
XY-mode (\emph{default: RedContLissajous}). Same remark as above.

\item[\texttt{plotstyle4}:] determines what kind of plot you will get for
add, sub or mul operation (third channel) (\emph{default: MagentaContAddSub}). Same
remark as above.

\item[\texttt{combine} (boolean):] if true allows to draw combination of SignalA
and SignalB on channel C (namely addition, subtraction or multiplication)
(\emph{default: false -- no signal}). See next item.

\item[\texttt{operation}:] determines what kind of operation will be applied to
SignalA and SignalB to get SignalC. The valid parameters are add, sub and mul
(\emph{default: \cs{relax} -- no operation}).

\item[\texttt{Fourier} (integer):] see below (Section \ref{Rectangular})
(\emph{default:~100}).

\item[\texttt{offset1} (real):] offset $c'_1$ (in V) of SignalA (\emph{default:~0}).

\item[\texttt{offset2} (real):] offset $c'_2$ (in V) of SignalB (\emph{default:~0}).

\item[\texttt{offset3} (real):] offset $c'_2$ (in V) of SignalC (\emph{default:~0}).


\end{description}

\subsection{Rectangular, triangular and dog's tooth signals\label{Rectangular}}

The parameter \texttt{Fourier} controls the precision of the Fourier transform used to
draw rectangular, triangular and dog's tooth signals. The number of  terms is fixed to
100 by default  in order to minimize the computation time. But you can give
\texttt{Fourier} any value you want.
\par
Note that those signals can also be damped using the \texttt{damping1} and
\texttt{damping2} parameters. By default, there is no damping ($\lambda=1$).

\subsection{\OsciPackage{} and \LaTeX}

\OsciPackage{} defines colors that may interact with the \textbf{`color'} package.
You should then use the \textbf{`pst-col'} package and load \OsciPackage{} this way:
\begin{Verbatim}
\usepackage{pstricks,pst-osci}
\end{Verbatim}

\subsection{Reducing the size of the Oscilloscope}

The oscilloscope is put inside a 10\,cm square \texttt{pspicture} environment. There
are two ways to reduce the size of the box, depending on the fonts you use.

\subsubsection{Using PostScript fonts}

We recommend that solution because it allows you to treat fonts like any other
PostScript object. As a matter of fact, you can, for instance, put your \cs{Oscillo}
macro inside a PSTricks \cs{psscalebox}. It is very simple and offers good results.
However, pay attention to the fact that, if you are using non-PS fonts, the result
will look ugly!

\subsubsection{Using non-PostScript fonts}

If you use non-PS fonts and if you want to reduce the size of the Oscilloscope, you
should type something like:
\begin{Verbatim}
{\psset{unit=0.5}\footnotesize\Oscillo}
\end{Verbatim}

\section{Examples}

\subsection{Basic examples}

\subsubsection{The \cs{Oscillo} macro, default parameters}
\begin{LTXexample}[pos=r,width=0.5\linewidth]
\psscalebox{0.5}{\Oscillo}
\end{LTXexample}



\textbf{In order to minimize the size of the file, all the oscilloscopes are drawn
scaled $\frac{1}{2}$. This reduced scale is not represented.}

\makeatletter
\let\Oldpst@Oscillo\pst@Oscillo
\def\pst@Oscillo[#1]{\psscalebox{0.5}{\Oldpst@Oscillo[#1]}}
\makeatother


If you only want to see SignalA then set \texttt{offset2} in order to have
$\texttt{offset2}\in ]-\infty,-4\times \texttt{sensivity2}[ 
\cup]4\times\texttt{sensivity2},+\infty[$:

\lstset{explpreset={pos=b,width=\linewidth,rframe=}}

\subsubsection{SignalB invisible}
\begin{LTXexample}[pos=r,width=0.5\linewidth]
\psscalebox{0.5}{\Oscillo[offset2=5]}
\end{LTXexample}


\subsubsection{The importance of sensivity}
Let's have a look at Channel A:

\begin{LTXexample}[]
% Extrema invisible
\psscalebox{0.5}{\Oscillo[offset2=5,amplitude1=5]}
\quad
% Good sensivity choice
\psscalebox{0.5}{\Oscillo[offset2=5,amplitude1=5,sensivity1=2]}
\end{LTXexample}

Now, let's have two signals on Channel A and B. By default, the two signals have the
same period and the same phase:

\begin{LTXexample}
% Different amplitude
\psscalebox{0.5}{\Oscillo[amplitude1=3,amplitude2=1.5]}
\quad
% Different period
\psscalebox{0.5}{\Oscillo[amplitude1=3,amplitude2=1.5,period2=50]}
\quad
% Different phase
\psscalebox{0.5}{\Oscillo[amplitude1=3,amplitude2=1.5,phase1=60,phase2=-30]}
\end{LTXexample}

\subsubsection{Damping and amplification}
\begin{LTXexample}[width=0.5\linewidth,pos=r]
\psscalebox{0.5}{\Oscillo[amplitude1=3,amplitude2=1.5,
    damping2=0.005,damping1=-0.005]}
\end{LTXexample}

\subsubsection{Changing the time scale}
\begin{LTXexample}[width=0.5\linewidth,pos=r]
\psscalebox{0.5}{\Oscillo[amplitude2=1.5,timediv=10]}
\end{LTXexample}

\newpage

\subsubsection{Vertical translations}
\begin{LTXexample}[width=0.5\linewidth,pos=r]
\psscalebox{0.5}{\Oscillo[
  amplitude1=1.5,amplitude2=1.5,
  offset1=1.5,offset2=-1.5]}
\end{LTXexample}


\subsubsection{Changing the plot style}
\begin{LTXexample}
\newpsstyle{BlueDots}{plotstyle=dots,linecolor=blue,linewidth=0.02,plotpoints=50}
\psscalebox{0.5}{\Oscillo[amplitude1=3,plotstyle2=BlueDots,amplitude2=2]}
\newpsstyle{GreenDash}{linestyle=dashed,linecolor=green,linewidth=0.035,plotpoints=50}
\quad
\psscalebox{0.5}{\Oscillo[amplitude1=2,phase1=90,amplitude2=3.8,period1=25,
    period2=50,phase2=10,plotstyle1=GreenDash]}
\end{LTXexample}

\subsection{Channel C: operations}

Note that \texttt{offset1} and \texttt{offset2} are \textbf{not} taken into account in
the operations when the \texttt{combine} parameter is set to true.


\newpage
\subsubsection{Additions}
\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[amplitude2=1.5,period2=50,period1=10,combine=true,operation=add]}
\quad
\psscalebox{0.5}{\Oscillo[amplitude2=1.5,period2=50,period1=10,
    combine=true,operation=add,offset1=2,offset2=2]}
\quad
% SignalA and SignalB are invisible
\psscalebox{0.5}{\Oscillo[amplitude2=1.5,period2=50,period1=10,
    combine=true,operation=add,offset1=6,offset2=6]}
\end{LTXexample}

\subsubsection{Subtraction}
\begin{LTXexample}[width=0.5\linewidth,pos=r]
\psscalebox{0.5}{\Oscillo[
    amplitude2=1.5,period2=50,period1=10,
    combine=true,operation=sub]}
\end{LTXexample}

\subsubsection{Multiplications}
\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[amplitude2=1.5,period2=50,period1=10,combine=true,operation=mul]}
\quad
\psscalebox{0.5}{\Oscillo[amplitude1=1,amplitude2=2,period2=50,period1=2,combine=true,operation=mul]}
\end{LTXexample}

\subsection{Channel C: XY-mode}

\subsubsection{Basic \textsc{Lissajous} curve}
\begin{LTXexample}[width=0.5\linewidth,pos=r]
\psscalebox{0.5}{\Oscillo[Lissajous=true,amplitude2=2]}
\end{LTXexample}

\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[Lissajous=true,amplitude2=3,phase2=45]}
\quad
\psscalebox{0.5}{\Oscillo[Lissajous=true,amplitude2=2,phase2=90]}
\end{LTXexample}

\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[amplitude1=3.5,phase1=90,amplitude2=3.5,
    period1=20,period2=10,phase2=0,Lissajous=true]}
\quad
\psscalebox{0.5}{\Oscillo[amplitude1=3.5,phase1=90,amplitude2=3.5,
    period1=25,period2=5,phase2=60,Lissajous=true]}
\end{LTXexample}


\newpage

\subsubsection{{A damped \textsc{Lissajous} diagram}}
\begin{LTXexample}[width=0.5\linewidth,pos=r]
\psscalebox{0.5}{\Oscillo[amplitude1=3.5,phase1=90,
    amplitude2=3.5,period1=50,period2=50,
    Lissajous=true,damping1=0.01,damping2=0.01]}
\end{LTXexample}



\subsection{Non-sinusoidal signals}
\subsubsection{Exponential signals}
\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[amplitude1=3.5,phase1=90,period1=2E30,offset2=5,damping1=0.02]}
\quad
\psscalebox{0.5}{\Oscillo[amplitude1=3.5,phase1=90,period1=2E30,offset2=3,
    amplitude2=-3,damping1=0.02,period2=2E31,damping2=0.02,phase2=90]}
\end{LTXexample}

\textbf{Note:} the maximum value for \texttt{period1} and \texttt{period2} is $\pm2E31$.

\subsubsection{Non-sinusoidal signals}
\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[Wave1=\TriangleA,amplitude2=2,period2=20,period1=25]}
\quad
\psscalebox{0.5}{\Oscillo[Wave1=\RectangleA,amplitude2=2,period2=20,period1=25]}
\end{LTXexample}

\subsubsection{Combine examples}
\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[Wave2=\TriangleB,combine=true,operation=mul,amplitude2=2,
    period2=50,period1=2,amplitude1=1]}
\quad
\psscalebox{0.5}{\Oscillo[combine=true,operation=add,amplitude2=1.5,
    Wave1=\RectangleA,amplitude1=1.5,period2=15]}
\quad
\psscalebox{0.5}{\Oscillo[combine=true,operation=add,amplitude2=1.5,
    Wave1=\RectangleA,amplitude1=1.5,period2=15,Wave2=\TriangleB]}
\end{LTXexample}

\subsubsection{Dog's tooth signal}
\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[combine=true,operation=mul,amplitude2=1.5,
    Wave1=\RDogToothA,amplitude1=1.5,period2=15]}
\quad
\psscalebox{0.5}{\Oscillo[amplitude1=3.5,phase1=90,amplitude2=3.5,
    period1=25,period2=6.25,phase2=0,Lissajous=true,Wave2=\RDogToothB]}
\end{LTXexample}

\subsection{Frequency modulation examples}

\begin{LTXexample}[pos=r,width=0.5\linewidth]
\psscalebox{0.5}{\Oscillo[periodmodulation1=200,
    freqmod1=5,period1=30,
    timediv=50,plotpoints=1000,amplitude2=2,period2=200]}
\end{LTXexample}

\begin{LTXexample}[pos=r,width=0.5\linewidth]
\psscalebox{0.5}{\Oscillo[amplitude1=1,amplitude2=1,
    period2=25,period1=2,combine=true,operation=mul]}
\end{LTXexample}

\begin{LTXexample}[pos=r,width=0.5\linewidth]
\psscalebox{0.5}{\Oscillo[
    amplitude1=1,amplitude2=1,CC2=2,
    period2=25,period1=2,combine=true,
    operation=mul,offset1=5]}
\end{LTXexample}

\begin{LTXexample}[pos=r,width=0.5\linewidth]
\psscalebox{0.5}{\Oscillo[
    amplitude1=1,amplitude2=1,CC2=1.5,
    Wave2=\TriangleB,
    period2=25,period1=2,combine=true,
    operation=mul,offset1=5]}
\end{LTXexample}

\begin{LTXexample}[pos=r,width=0.5\linewidth]
\psscalebox{0.5}{\Oscillo[
    amplitude1=1,amplitude2=1,CC2=2,
    Wave2=\RDogToothB,
    period2=25,period1=2,combine=true,operation=mul,offset1=5]}
\end{LTXexample}


\begin{LTXexample}[pos=r,width=0.5\linewidth]
\psscalebox{0.5}{\Oscillo[
    amplitude1=1,amplitude2=1,CC2=-2,
    Wave2=\LDogToothB,
    period2=20,period1=3,combine=true,
    operation=mul,offset1=5]}
\end{LTXexample}

\begin{LTXexample}[pos=r,width=0.5\linewidth]
\psscalebox{0.5}{\Oscillo[
    amplitude1=1,amplitude2=1,CC2=2,
    Wave2=\RDogToothB,
    period2=25,period1=2,combine=true,operation=mul,
    offset1=5,offset3=-1]}
\end{LTXexample}

\begin{LTXexample}[pos=r,width=0.5\linewidth]
\psscalebox{0.5}{\Oscillo[amplitude1=1,
    amplitude2=1,CC2=-2,
    Wave2=\LDogToothB,
    period2=20,period1=3,combine=true,operation=mul,
    offset1=5,offset3=1]}
\end{LTXexample}

\section{More examples}

\begin{LTXexample}[pos=r,width=0.5\linewidth]
\psscalebox{0.5}{\Oscillo[amplitude1=3.5,phase1=90,amplitude2=3.5,
    period1=50,
    period2=50,phase2=0,Lissajous=true,damping1=0.01,
    Wave2=\RectangleB]}
\end{LTXexample}

\begin{LTXexample}[pos=r,width=0.5\linewidth]
\psscalebox{0.5}{\Oscillo[amplitude1=2,amplitude2=1.8,
    Wave1=\RectangleA,
    Fourier=500,period1=25,period2=12.5,
    combine=true,
    operation=add,Wave2=\RectangleB]}
\end{LTXexample}

\begin{LTXexample}[pos=r,width=0.5\linewidth]
\psscalebox{0.5}{\Oscillo[amplitude1=4,amplitude2=3,
    period1=50,
    period2=5,Lissajous=true,Wave1=\RectangleA]}
\end{LTXexample}

\begin{LTXexample}[pos=r,width=0.5\linewidth]
\psscalebox{0.5}{\Oscillo[amplitude1=3,phase1=90,
    amplitude2=3,damping1=0.05,
    period1=25,period2=12.5,phase2=0,
    Lissajous=true,Wave2=\RDogToothB]}
\end{LTXexample}

\begin{LTXexample}[pos=r,width=0.5\linewidth]
\psscalebox{0.5}{\Oscillo[
    amplitude1=4,amplitude2=3,period1=25,
    period2=50,Lissajous=true,damping1=0.02,
    Wave2=\TriangleB]}
\end{LTXexample}

\begin{LTXexample}[pos=r,width=0.5\linewidth]
\psscalebox{0.5}{\Oscillo[Wave2=\LDogToothB,
    combine=true,
    operation=mul,
    amplitude2=2,period2=50,period1=2,amplitude1=1]}
\end{LTXexample}


\begin{LTXexample}[pos=r,width=0.5\linewidth]
 \psscalebox{0.5}{\Oscillo[amplitude1=3.5,phase1=90,%
    amplitude2=3.5,period1=50,
    period2=50,phase2=0,
    Lissajous=true,damping1=0.01,
    Wave2=\RectangleB,damping2=0.01]}
\end{LTXexample}

\section{Examples by Raoul Hatterer}


\subsection{Oscillo}
\begin{LTXexample}
\psscalebox{0.5}{\Oscillo \quad \Oscillo[AllColor=false]}
\end{LTXexample}

\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[offset2= 5] \quad \Oscillo[offset2= 5,AllColor=false]}
\end{LTXexample}

\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[offset2=5, amplitude1=5] 
\quad
\Oscillo[offset2=5, amplitude1=5,AllColor=false]}
\end{LTXexample}

% Good sensivity choice
\subsection{Good sensivity choice}
\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[offset2=5,amplitude1=5, sensivity1=2]
\quad
\Oscillo[offset2=5,amplitude1=5, sensivity1=2,AllColor=false]}
\end{LTXexample}

% Different amplitude
\subsection{Different amplitude}
\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[amplitude1=3, amplitude2=1.5]
\quad
\Oscillo[amplitude1=3, amplitude2=1.5,AllColor=false]}
\end{LTXexample}
% Different period

\newpage


\subsubsection{Different period}
\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[amplitude1=3,amplitude2=1.5, period2=50]
\quad
\Oscillo[amplitude1=3,amplitude2=1.5, period2=50,AllColor=false]}
\end{LTXexample}

% Different phase
\subsection {Different phase}
\begin{LTXexample}
\psscalebox{0.5}{%
\Oscillo[amplitude1=3,amplitude2=1.5, phase1=60, phase2=-30]
\quad
\Oscillo[amplitude1=3,amplitude2=1.5, phase1=60, phase2=-30,AllColor=false]}
\end{LTXexample}

\subsection{Damping and amplification}
\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[amplitude1=3,amplitude2=1.5,damping2=0.005, damping1=-0.005]
\quad
\Oscillo[amplitude1=3,amplitude2=1.5,damping2=0.005, damping1=-0.005,AllColor=false]}
\end{LTXexample}


\subsection{Changing the plot style}
\begin{LTXexample}
\psscalebox{0.5}{%
\newpsstyle{BlueDots}{plotstyle=dots,linecolor=blue,linewidth=0.02,plotpoints=50}
\Oscillo[amplitude1=3, plotstyle2=BlueDots,amplitude2=2]
\quad
\newpsstyle{GreenDash}{linestyle=dashed,linecolor=green,linewidth=0.035,plotpoints=50}
\Oscillo[amplitude1=2,phase1=90,amplitude2=3.8,period1=25,period2=50,phase2=10, plotstyle1=GreenDash]}
\end{LTXexample}


\begin{LTXexample}
\psscalebox{0.5}{\newpsstyle{BlueDots}{%
  plotstyle=dots,linecolor=blue,linewidth=0.02,plotpoints=50}
\Oscillo[amplitude1=3, plotstyle2=BlueDots,amplitude2=2,AllColor=false]
\quad
\newpsstyle{GreenDash}{linestyle=dashed,
linecolor=green,linewidth=0.035,plotpoints=50}
\quad
\Oscillo[amplitude1=2,phase1=90,amplitude2=3.8,period1=25,
period2=50,phase2=10, plotstyle1=GreenDash,AllColor=false]}
\end{LTXexample}


Note: This is no longer possible if you set \verb+AllColor=false+. 
But nothing stops you from making \verb+linecolor=black+ 
(however the \texttt{on} and \texttt{off} will not print any better than before


\newpage

\subsection{Channel C: operations}
\begin{LTXexample}
\psscalebox{0.5}{%
\Oscillo[amplitude2=1.5,period2=50,period1=10,combine= true, operation= add]
\quad
\Oscillo[amplitude2=1.5,period2=50,period1=10,combine= true, operation= add,offset1=2,offset2=2]
\quad
% SignalA and SignalB are invisible
\Oscillo[amplitude2=1.5,period2=50,period1=10,combine= true, operation= add,offset1=6,offset2=6]}
\end{LTXexample}


\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[amplitude2=1.5,period2=50,period1=10,
combine= true, operation= add,AllColor=false]
\quad
\Oscillo[amplitude2=1.5,period2=50,period1=10,
combine= true, operation= add,offset1=2,offset2=2,AllColor=false]
\quad
% SignalA and SignalB are invisible
\Oscillo[amplitude2=1.5,period2=50,period1=10,
combine= true, operation= add,offset1=6,offset2=6,AllColor=false]}
\end{LTXexample}

\newpage

\subsection{Subtraction}

\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[amplitude2=1.5,period2=50,period1=10,combine= true,operation= sub]
\quad
\Oscillo[amplitude2=1.5,period2=50,period1=10,combine= true,operation= sub,AllColor=false]}
\end{LTXexample}

\subsection{Multiplications}

\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[amplitude2=1.5,period2=50,period1=10,combine= true, operation= mul]
\quad
\Oscillo[amplitude1=1,amplitude2=2,period2=50,period1=2, combine= true, operation= mul]}
\end{LTXexample}


\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[amplitude2=1.5,period2=50,period1=10,
combine= true, operation= mul,AllColor=false]\quad
\Oscillo[amplitude1=1,amplitude2=2,
period2=50,period1=2, combine= true, operation= mul,AllColor=false]}
\end{LTXexample}


\newpage

\subsection{Channel C: XY-mode}
\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[ Lissajous= true,amplitude2=2]
\quad
\Oscillo[Lissajous=true,amplitude2=3,phase2=45]
\quad
\Oscillo[Lissajous=true,amplitude2=2,phase2=90]}
\end{LTXexample}


\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[ Lissajous=true,amplitude2=2,AllColor=false]
\Oscillo[Lissajous=true,amplitude2=3,phase2=45,AllColor=false]
\quad
\Oscillo[Lissajous=true,amplitude2=2,phase2=90,AllColor=false]}
\end{LTXexample}


\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[amplitude1=3.5,phase1=90,amplitude2=3.5,
  period1=20,period2=10,phase2=0,Lissajous=true]
\quad
\Oscillo[amplitude1=3.5,phase1=90,amplitude2=3.5,period1=25,period2=5,phase2=60,Lissajous=true]
\quad
\Oscillo[amplitude1=3.5,phase1=90, amplitude2=3.5,period1=50,period2=50,
  Lissajous=true,damping1=0.01,damping2=0.01]}
\end{LTXexample}


\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[amplitude1=3.5,phase1=90,amplitude2=3.5, 
  period1=20,period2=10,phase2=0,Lissajous=true,AllColor=false]
\Oscillo[amplitude1=3.5,phase1=90,amplitude2=3.5,
  period1=25,period2=5,phase2=60,Lissajous=true,AllColor=false]
\Oscillo[amplitude1=3.5,phase1=90,amplitude2=3.5,period1=50,period2=50,
  Lissajous=true,damping1=0.01,damping2=0.01,AllColor=false]}
\end{LTXexample}


\subsection{Non sinusoidal signals}

%\subsubsection*{Exponential signals}
\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[amplitude1=3.5,phase1=90,period1= 2E30,offset2=5,damping1=0.02]
\quad
\Oscillo[amplitude1=3.5,phase1=90,period1= 2E30,offset2=3,amplitude2=-3,damping1=0.02,
  period2= 2E31,damping2=0.02,phase2=90]}
\end{LTXexample}

\begin{LTXexample}
\psscalebox{0.5}{%
\Oscillo[amplitude1=3.5,phase1=90,period1= 2E30,offset2=5,damping1=0.02,AllColor=false]
\quad
\Oscillo[amplitude1=3.5,phase1=90,
  period1= 2E30,offset2=3,amplitude2=-3,damping1=0.02,
  period2= 2E31,damping2=0.02,phase2=90,AllColor=false]}
\end{LTXexample}


\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[ Wave1= \TriangleA,amplitude2=2,period2=20,period1=25]\quad
  \Oscillo[ Wave1= \RectangleA,amplitude2=2,period2=20,period1=25]}

\bigskip
\psscalebox{0.5}{\Oscillo[ Wave1= \TriangleA,amplitude2=2,period2=20,period1=25,AllColor=false]\quad
  \Oscillo[ Wave1= \RectangleA,amplitude2=2,period2=20,period1=25,AllColor=false]}
\end{LTXexample}


\newpage
\subsection{Combine examples}
\begin{LTXexample}
\psscalebox{0.5}{%
  \Oscillo[Wave2=\TriangleB,combine=true,operation=mul,amplitude2=2,period2=50,period1=2,amplitude1=1]
  \quad 
  \Oscillo[combine=true,operation=add,amplitude2=1.5,Wave1=\RectangleA,amplitude1=1.5,period2=15]
  \quad
  \Oscillo[combine=true,operation=add,amplitude2=1.5,Wave1=\RectangleA,amplitude1=1.5,period2=15,Wave2=\TriangleB]}
\end{LTXexample}


\begin{LTXexample}
\psscalebox{0.5}{%
\Oscillo[Wave2=\TriangleB,combine=true,operation=mul,amplitude2=2,period2=50,period1=2,amplitude1=1,AllColor=false]
\quad
\Oscillo[combine=true,operation=add,amplitude2=1.5,Wave1=\RectangleA,amplitude1=1.5,period2=15,AllColor=false]
\quad
\Oscillo[combine=true,operation=add,amplitude2=1.5,Wave1=\RectangleA,amplitude1=1.5,period2=15,Wave2=\TriangleB,AllColor=false]}
\end{LTXexample}



\newpage

\subsection{Dog's tooth signal}

\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[combine=true,operation=mul,amplitude2=1.5,
  Wave1= \RDogToothA,amplitude1=1.5,period2=15]\quad
\Oscillo[amplitude1=3.5,phase1=90,amplitude2=3.5,
  period1=25,period2=6.25,phase2=0,Lissajous=true,Wave2=\RDogToothB]}
\end{LTXexample}


\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[combine=true,operation=mul,amplitude2=1.5,
  Wave1= \RDogToothA,amplitude1=1.5,period2=15,AllColor=false]\quad
\Oscillo[amplitude1=3.5,phase1=90,amplitude2=3.5,
  period1=25,period2=6.25,phase2=0,Lissajous=true,Wave2=\RDogToothB,AllColor=false]}
\end{LTXexample}

\subsection{Frequency modulation examples}
\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[ periodmodulation1=200, freqmod1=5,period1=30,
timediv=50,plotpoints=1000,amplitude2=2,period2=200]
\Oscillo[amplitude1=1,amplitude2=1,
period2=25,period1=2,combine=true,operation=mul]
\Oscillo[amplitude1=1,amplitude2=1, CC2=2,
period2=25,period1=2,combine=true,operation=mul,offset1=5]}
\end{LTXexample}


\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[ periodmodulation1=200, freqmod1=5,period1=30,
timediv=50,plotpoints=1000,amplitude2=2,period2=200,AllColor=false]
\quad
\Oscillo[amplitude1=1,amplitude2=1,
period2=25,period1=2,combine=true,operation=mul,AllColor=false]
\quad
\Oscillo[amplitude1=1,amplitude2=1, CC2=2,
period2=25,period1=2,combine=true,operation=mul,offset1=5,AllColor=false]}
\end{LTXexample}

\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[amplitude1=1,amplitude2=1,CC2=1.5,Wave2=\TriangleB,
period2=25,period1=2,combine=true,operation=mul,offset1=5]
\Oscillo[amplitude1=1,amplitude2=1,CC2=2,Wave2=\RDogToothB,
period2=25,period1=2,combine=true,operation=mul,offset1=5]
\Oscillo[amplitude1=1,amplitude2=1,CC2=-2,Wave2=\LDogToothB,
period2=20,period1=3,combine=true,operation=mul,offset1=5]}
\end{LTXexample}

\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[amplitude1=1,amplitude2=1,CC2=1.5,Wave2=\TriangleB,
  period2=25,period1=2,combine=true,operation=mul,offset1=5,AllColor=false]
\quad
\Oscillo[amplitude1=1,amplitude2=1,CC2=2,Wave2=\RDogToothB,
  period2=25,period1=2,combine=true,operation=mul,offset1=5,AllColor=false]
\quad
\Oscillo[amplitude1=1,amplitude2=1,CC2=-2,Wave2=\LDogToothB,
  period2=20,period1=3,combine=true,operation=mul,offset1=5,AllColor=false]}
\end{LTXexample}


\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[amplitude1=1,amplitude2=1,CC2=2,Wave2=\RDogToothB,
period2=25,period1=2,combine=true,operation=mul,
offset1=5,offset3=-1]
\quad
\Oscillo[amplitude1=1,amplitude2=1,CC2=-2,Wave2=\LDogToothB,
period2=20,period1=3,combine=true,operation=mul,
offset1=5,offset3=1]}
\end{LTXexample}


\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[amplitude1=1,amplitude2=1,CC2=2,Wave2=\RDogToothB,
period2=25,period1=2,combine=true,operation=mul,
offset1=5,offset3=-1,AllColor=false]
\quad
\Oscillo[amplitude1=1,amplitude2=1,CC2=-2,Wave2=\LDogToothB,
period2=20,period1=3,combine=true,operation=mul,
offset1=5,offset3=1,AllColor=false]}
\end{LTXexample}

\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[amplitude1=3.5,phase1=90,amplitude2=3.5,period1=50,
period2=50,phase2=0,Lissajous=true,damping1=0.01,
Wave2=\RectangleB] 
\quad
\Oscillo[amplitude1=2,amplitude2=1.8,Wave1=\RectangleA,
Fourier=500,period1=25,period2=12.5,combine=true,
operation=add,Wave2=\RectangleB]  
\quad
\Oscillo[amplitude1=4,amplitude2=3,period1=50,
period2=5,Lissajous=true,Wave1=\RectangleA]}
\end{LTXexample}


\begin{LTXexample}
\psscalebox{0.5}{\Oscillo[amplitude1=3.5,phase1=90,amplitude2=3.5,period1=50,
period2=50,phase2=0,Lissajous=true,damping1=0.01,
Wave2=\RectangleB,AllColor=false]
\quad
\Oscillo[amplitude1=2,amplitude2=1.8,Wave1=\RectangleA,
Fourier=500,period1=25,period2=12.5,combine=true,
operation=add,Wave2=\RectangleB,AllColor=false]
\quad
\Oscillo[amplitude1=4,amplitude2=3,period1=50,
period2=5,Lissajous=true,Wave1=\RectangleA,AllColor=false]}
\end{LTXexample}


\end{document}
