\documentclass [a4paper,12pt,dvips]{article}
\usepackage[latin1]{inputenc}%accepte les accents
\usepackage[francais]{babel}% règles de césure
\usepackage{pstricks}
\usepackage{pst-osci}
\usepackage{pst-char,pst-text}%,pst-plot}
%\usepackage[usenames] {pstcol}

\title {pst-osci \& AllColor}
\author {Raoul \textsc{Hatterer}}
\begin {document}
\maketitle
\section {Présentation}
J'ai trouvé ce package magnifique de puissance et de simplicité mais les couleurs employées ne passant pas à l'impression noir et blanc j'ai ajouté une option qui emploie des nuances de gris pour palier à ce problème.
\section {Utilisation}
\subsection {En préambule}
\verb+\usepackage{pst-osci}+

Remarque: \verb+\usepackage{pstcol}+ n'est pas utilisable.
\subsection {Commande}
\verb+\Oscillo[options éventuelles]+

\subsection{Compilation}
Sous MacOSX j'utilise \emph{altpdflatex} ce qui doit correspondre à \emph{latex+dvips+ps2pdf}.
\subsection {Nouvelle option}
\verb+AllColor+ qui par defaut est à \verb+true+ mais qui lorsqu'on la met à \verb+false+ permet d'obtenir des oscillogrammes qui passent mieux à l'impression.

\section {Exemples}
Je reprends les exemples du document \emph{pst-osci.pdf} de Manuel \textsc{Luque} et Christophe \textsc{Jorssen}\footnote{Les auteurs du package \emph{pst-osci}}  pour m'assurer qu'ils fonctionnent tels quels puis en rajoutant \verb+AllColor=false+. La taille est réduite à 50 \% grâce à \verb+\psscalebox {0.5}{ }+.

\subsection{Oscillo \& Oscillo[AllColor=false]}
\psscalebox{0.5}{\Oscillo \hspace{1cm}\Oscillo[AllColor=false]}

\subsection{Oscillo[offset2= 5] \& Oscillo[offset2= 5, AllColor=false]}
\psscalebox{0.5}{\Oscillo[offset2= 5] \hspace{1cm} \Oscillo[offset2= 5,AllColor=false]}

Remarque: À partir de là, je ne précise plus que la figure de droite a été obtenue en rajoutant l'option \verb+AllColor=false+.
% Extrema invisible
\subsection{ Extrema invisible: Oscillo[offset2=5, amplitude1=5]}
\psscalebox{0.5}{\Oscillo[offset2=5, amplitude1=5] \hspace{1cm}
\Oscillo[offset2=5, amplitude1=5,AllColor=false]}

% Good sensivity choice
\subsection{Good sensivity choice: Oscillo[offset2=5,amplitude1=5, sensivity1=2]}
\psscalebox{0.5}{\Oscillo[offset2=5,amplitude1=5, sensivity1=2]\hspace{1cm}
\Oscillo[offset2=5,amplitude1=5, sensivity1=2,AllColor=false]}

% Different amplitude
\subsection{Different amplitude: Oscillo[amplitude1=3, amplitude2=1.5]}
\psscalebox{0.5}{\Oscillo[amplitude1=3, amplitude2=1.5]\hspace{1cm}
\Oscillo[amplitude1=3, amplitude2=1.5,AllColor=false]}
% Different period
\subsubsection{Different period: Oscillo[amplitude1=3,amplitude2=1.5, period2=50]}
\psscalebox{0.5}{\Oscillo[amplitude1=3,amplitude2=1.5, period2=50]\hspace{1cm}
\Oscillo[amplitude1=3,amplitude2=1.5, period2=50,AllColor=false]}
% Different phase
\subsection {Different phase: Oscillo[amplitude1=3,amplitude2=1.5, phase1=60, phase2=-30]}
\psscalebox{0.5}{\Oscillo[amplitude1=3,amplitude2=1.5, phase1=60, phase2=-30]\hspace{1cm}
\Oscillo[amplitude1=3,amplitude2=1.5, phase1=60, phase2=-30,AllColor=false]}

\subsection{Damping and amplification: Oscillo[amplitude1=3,amplitude2=1.5,
damping2=0.005, damping1=-0.005]}
\psscalebox{0.5}{\Oscillo[amplitude1=3,amplitude2=1.5,
damping2=0.005, damping1=-0.005]\hspace{1cm}
\Oscillo[amplitude1=3,amplitude2=1.5,
damping2=0.005, damping1=-0.005,AllColor=false]}


\subsection {Changing the plot style}
\psscalebox{0.5}{\newpsstyle{BlueDots}{plotstyle=dots,
linecolor=blue,linewidth=0.02,plotpoints=50}
\Oscillo[amplitude1=3, plotstyle2=BlueDots,amplitude2=2]\hspace{1cm}
\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]}
\\

\psscalebox{0.5}{\newpsstyle{BlueDots}{plotstyle=dots,
linecolor=blue,linewidth=0.02,plotpoints=50}
\Oscillo[amplitude1=3, plotstyle2=BlueDots,amplitude2=2,AllColor=false]\hspace{1cm}
\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,AllColor=false]}


\begin{verbatim}
\newpsstyle{BlueDots}{plotstyle=dots,
linecolor=blue,linewidth=0.02,plotpoints=50}
\Oscillo[amplitude1=3, plotstyle2=BlueDots,amplitude2=2]\hspace{1cm}
\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{verbatim}

Remarque: Ce n'est plus possible si l'on met \verb+AllColor=false+. Mais rien ne vous empêche de faire des \verb+linecolor=black+ (cependant les \textsc{on} et \textsc{off} ne passeront pas mieux à l'impression qu'auparavant).

\subsection{Channel C: operations}
\psscalebox{0.5}{\Oscillo[amplitude2=1.5,period2=50,period1=10,
combine= true, operation= add]
\Oscillo[amplitude2=1.5,period2=50,period1=10,
combine= true, operation= add,offset1=2,offset2=2]
% SignalA and SignalB are invisible
\Oscillo[amplitude2=1.5,period2=50,period1=10,
combine= true, operation= add,offset1=6,offset2=6]}
\\

\psscalebox{0.5}{\Oscillo[amplitude2=1.5,period2=50,period1=10,
combine= true, operation= add,AllColor=false]
\Oscillo[amplitude2=1.5,period2=50,period1=10,
combine= true, operation= add,offset1=2,offset2=2,AllColor=false]
% SignalA and SignalB are invisible
\Oscillo[amplitude2=1.5,period2=50,period1=10,
combine= true, operation= add,offset1=6,offset2=6,AllColor=false]}

\begin{verbatim}
\Oscillo[amplitude2=1.5,period2=50,period1=10,
combine= true, operation= add]
\Oscillo[amplitude2=1.5,period2=50,period1=10,
combine= true, operation= add,offset1=2,offset2=2]
% SignalA and SignalB are invisible
\Oscillo[amplitude2=1.5,period2=50,period1=10,
combine= true, operation= add,offset1=6,offset2=6]
\end{verbatim}

\subsection{Subtraction: Oscillo[amplitude2=1.5,period2=50,period1=10,
combine= true,operation= sub]}

\psscalebox{0.5}{\Oscillo[amplitude2=1.5,period2=50,period1=10,
combine= true,
operation= sub]\hspace{1cm}
\Oscillo[amplitude2=1.5,period2=50,period1=10,
combine= true,
operation= sub,AllColor=false]}

\subsection {Multiplications}
\psscalebox{0.5}{\Oscillo[amplitude2=1.5,period2=50,period1=10,
combine= true, operation= mul]\hspace{1cm}
\Oscillo[amplitude1=1,amplitude2=2,
period2=50,period1=2, combine= true, operation= mul]}
\\

\psscalebox{0.5}{\Oscillo[amplitude2=1.5,period2=50,period1=10,
combine= true, operation= mul,AllColor=false]\hspace{1cm}
\Oscillo[amplitude1=1,amplitude2=2,
period2=50,period1=2, combine= true, operation= mul,AllColor=false]}

\begin{verbatim}
\Oscillo[amplitude2=1.5,period2=50,period1=10,
combine= true, operation= mul]
\Oscillo[amplitude1=1,amplitude2=2,
period2=50,period1=2, combine= true, operation= mul]
\end{verbatim}

\subsection{Channel C: XY-mode}
\psscalebox{0.5}{\Oscillo[ Lissajous= true,amplitude2=2]
\Oscillo[Lissajous=true,amplitude2=3,phase2=45]
\Oscillo[Lissajous=true,amplitude2=2,phase2=90]}
\\

\psscalebox{0.5}{\Oscillo[ Lissajous=true,amplitude2=2,AllColor=false]
\Oscillo[Lissajous=true,amplitude2=3,phase2=45,AllColor=false]
\Oscillo[Lissajous=true,amplitude2=2,phase2=90,AllColor=false]}
\begin{verbatim}
\Oscillo[ Lissajous= true,amplitude2=2]
\Oscillo[Lissajous=true,amplitude2=3,phase2=45]
\Oscillo[Lissajous=true,amplitude2=2,phase2=90]
\end{verbatim}

\psscalebox{0.5}{\Oscillo[amplitude1=3.5,phase1=90,amplitude2=3.5,
period1=20,period2=10,phase2=0,Lissajous=true]
\Oscillo[amplitude1=3.5,phase1=90,amplitude2=3.5,
period1=25,period2=5,phase2=60,Lissajous=true]
\Oscillo[amplitude1=3.5,phase1=90,
amplitude2=3.5,period1=50,period2=50,
Lissajous=true,damping1=0.01,damping2=0.01]}
\\

\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]}

\begin{verbatim}
\Oscillo[amplitude1=3.5,phase1=90,amplitude2=3.5,
period1=20,period2=10,phase2=0,Lissajous=true]
\Oscillo[amplitude1=3.5,phase1=90,amplitude2=3.5,
period1=25,period2=5,phase2=60,Lissajous=true]
\Oscillo[amplitude1=3.5,phase1=90,
amplitude2=3.5,period1=50,period2=50,
Lissajous=true,damping1=0.01,damping2=0.01]
\end{verbatim}

\subsection{Non sinusoidal signals}

%\subsubsection*{Exponential signals}
\psscalebox{0.5}{\Oscillo[amplitude1=3.5,phase1=90,
period1= 2E30,offset2=5,damping1=0.02]\hspace{1cm}
\Oscillo[amplitude1=3.5,phase1=90,
period1= 2E30,offset2=3,amplitude2=-3,damping1=0.02,
period2= 2E31,damping2=0.02,phase2=90]}

\psscalebox{0.5}{\Oscillo[amplitude1=3.5,phase1=90,
period1= 2E30,offset2=5,damping1=0.02,AllColor=false]\hspace{1cm}
\Oscillo[amplitude1=3.5,phase1=90,
period1= 2E30,offset2=3,amplitude2=-3,damping1=0.02,
period2= 2E31,damping2=0.02,phase2=90,AllColor=false]}

\begin{verbatim}
\Oscillo[amplitude1=3.5,phase1=90,
period1= 2E30,offset2=5,damping1=0.02]
\Oscillo[amplitude1=3.5,phase1=90,
period1= 2E30,offset2=3,amplitude2=-3,da
period2= 2E31,damping2=0.02,phase2=90]
\end{verbatim}

\psscalebox{0.5}{\Oscillo[ Wave1= \TriangleA,amplitude2=2,period2=20,period1=25]\hspace{1cm}
\Oscillo[ Wave1= \RectangleA,amplitude2=2,period2=20,period1=25]}
\\

\psscalebox{0.5}{\Oscillo[ Wave1= \TriangleA,amplitude2=2,period2=20,period1=25,AllColor=false]\hspace{1cm}
\Oscillo[ Wave1= \RectangleA,amplitude2=2,period2=20,period1=25,AllColor=false]}

\subsection{Combine examples}
\psscalebox{0.5}{\Oscillo[Wave2=\TriangleB,combine=true,operation=mul,amplitude2=2,period2=50,period1=2,amplitude1=1]
\Oscillo[combine=true,operation=add,amplitude2=1.5,Wave1=\RectangleA,amplitude1=1.5,period2=15]
\Oscillo[combine=true,operation=add,amplitude2=1.5,Wave1=\RectangleA,amplitude1=1.5,period2=15,Wave2=\TriangleB]}
\\

\psscalebox{0.5}{\Oscillo[Wave2=\TriangleB,combine=true,operation=mul,amplitude2=2,period2=50,period1=2,amplitude1=1,AllColor=false]
\Oscillo[combine=true,operation=add,amplitude2=1.5,Wave1=\RectangleA,amplitude1=1.5,period2=15,AllColor=false]
\Oscillo[combine=true,operation=add,amplitude2=1.5,Wave1=\RectangleA,amplitude1=1.5,period2=15,Wave2=\TriangleB,AllColor=false]
}
\begin{verbatim}
\Oscillo[Wave2=\TriangleB,combine=true,operation=mul,amplitude2=2,
period2=50,period1=2,amplitude1=1]
\Oscillo[combine=true,operation=add,amplitude2=1.5,
Wave1=\RectangleA,amplitude1=1.5,period2=15]
\Oscillo[combine=true,operation=add,amplitude2=1.5,
Wave1=\RectangleA,amplitude1=1.5,period2=15,Wave2=\TriangleB]
\end{verbatim}

\subsection{Dog's tooth signal}
\psscalebox{0.5}{\Oscillo[combine=true,operation=mul,amplitude2=1.5,
Wave1= \RDogToothA,amplitude1=1.5,period2=15]\hspace{1cm}
\Oscillo[amplitude1=3.5,phase1=90,amplitude2=3.5,
period1=25,period2=6.25,phase2=0,Lissajous=true,Wave2=\RDogToothB]}
\\

\psscalebox{0.5}{\Oscillo[combine=true,operation=mul,amplitude2=1.5,
Wave1= \RDogToothA,amplitude1=1.5,period2=15,AllColor=false]\hspace{1cm}
\Oscillo[amplitude1=3.5,phase1=90,amplitude2=3.5,
period1=25,period2=6.25,phase2=0,Lissajous=true,Wave2=\RDogToothB,AllColor=false]}

\begin{verbatim}
\Oscillo[combine=true,operation=mul,amplitude2=1.5,
Wave1= \RDogToothA,amplitude1=1.5,period2=15]
\Oscillo[amplitude1=3.5,phase1=90,amplitude2=3.5,
period1=25,period2=6.25,phase2=0,Lissajous=true,Wave2=\RDogToothB]
\end{verbatim}

\subsection{Frequency modulation examples}
\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]}
\\

\psscalebox{0.5}{\Oscillo[ periodmodulation1=200, freqmod1=5,period1=30,
timediv=50,plotpoints=1000,amplitude2=2,period2=200,AllColor=false]
\Oscillo[amplitude1=1,amplitude2=1,
period2=25,period1=2,combine=true,operation=mul,AllColor=false]
\Oscillo[amplitude1=1,amplitude2=1, CC2=2,
period2=25,period1=2,combine=true,operation=mul,offset1=5,AllColor=false]}

\begin{verbatim}
\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{verbatim}

\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]}
\\

\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]
\Oscillo[amplitude1=1,amplitude2=1,CC2=2,Wave2=\RDogToothB,
period2=25,period1=2,combine=true,operation=mul,offset1=5,AllColor=false]
\Oscillo[amplitude1=1,amplitude2=1,CC2=-2,Wave2=\LDogToothB,
period2=20,period1=3,combine=true,operation=mul,offset1=5,AllColor=false]}

\begin{verbatim}
\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{verbatim}

\psscalebox{0.5}{\Oscillo[amplitude1=1,amplitude2=1,CC2=2,Wave2=\RDogToothB,
period2=25,period1=2,combine=true,operation=mul,
offset1=5,offset3=-1]\hspace{1cm}
\Oscillo[amplitude1=1,amplitude2=1,CC2=-2,Wave2=\LDogToothB,
period2=20,period1=3,combine=true,operation=mul,
offset1=5,offset3=1]}
\\

\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]\hspace{1cm}
\Oscillo[amplitude1=1,amplitude2=1,CC2=-2,Wave2=\LDogToothB,
period2=20,period1=3,combine=true,operation=mul,
offset1=5,offset3=1,AllColor=false]}

\begin{verbatim}
\Oscillo[amplitude1=1,amplitude2=1,CC2=2,Wave2=\RDogToothB,
period2=25,period1=2,combine=true,operation=mul,
offset1=5,offset3=-1]\hspace{1cm}
\Oscillo[amplitude1=1,amplitude2=1,CC2=-2,Wave2=\LDogToothB,
period2=20,period1=3,combine=true,operation=mul,
offset1=5,offset3=1]
\end{verbatim}

\subsection{More examples}
\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]
\Oscillo[amplitude1=2,amplitude2=1.8,Wave1=\RectangleA,
Fourier=500,period1=25,period2=12.5,combine=true,
operation=add,Wave2=\RectangleB]
\Oscillo[amplitude1=4,amplitude2=3,period1=50,
period2=5,Lissajous=true,Wave1=\RectangleA]}
\\

\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]
\Oscillo[amplitude1=2,amplitude2=1.8,Wave1=\RectangleA,
Fourier=500,period1=25,period2=12.5,combine=true,
operation=add,Wave2=\RectangleB,AllColor=false]
\Oscillo[amplitude1=4,amplitude2=3,period1=50,
period2=5,Lissajous=true,Wave1=\RectangleA,AllColor=false]}


\end {document}
