0

oscillogramme

I need to replicate this oscillogram using LaTeX. I know a bit of TiKZ but I would like to have some tips or packages to get started building this and at the end come up my own to draw others like this.

$u(t) = 8\cos(400\pi t)$ and $i(t) = 0,2\cos(400\pi t - \dfrac{2\pi}{5})$ are examples.

1 Answers1

1

Maybe you could alter this, with the equations you need?

\documentclass{article}
\usepackage{pgfplots}
\usepackage[graphics,tightpage,active]{preview}

\PreviewEnvironment{tikzpicture} \pgfplotsset{compat=1.9} \usetikzlibrary{backgrounds}

\begin{document}

\begin{tikzpicture}
\begin{axis}[
    ymin=-4,%
    ymax=4,%
    grid=both,%
    %axis on top
    ]
 \begin{scope}[on background layer]
\fill[blue,opacity=0.5] ({rel axis cs:0,0}) rectangle ({rel axis cs:1,1});

\end{scope}
 \addplot[domain=-360:360, white , very thick, smooth]{sin(x)}; %add equation here
\addplot[domain=-360:360, green , very thick, smooth]{2*cos(x)};% and here
\end{axis}

\end{tikzpicture}

\end{document}

Paul A
  • 1,055
  • 4
  • 14