Clipped Output Sine Wave Signal

A sine curve, where the y-values do not exceed a certain value.

PGFPlots has two different types of clipping: the first is the graphical clipping operation which is activated by clip, the second is based on coordinate value manipulation, more precisely by restrict y to domain*.

This topic was discussed on:

Clipped curve

Edit and compile if you like:
% Create a function for generating inverse normally distributed numbers using the Box–Muller transform
\newcommand*{\val}{0.8}% the absolut value of the limit
% Code for brownian motion
        domain     = -6.283:6.283,
        grid       = both, minor tick num=2,
        title      = Clipped Output Sine Wave Signal,
        xlabel     = Time,
        ylabel     = Volt,
        legend pos = outer north east,
        restrict y to domain* = -\val:\val
      \addplot[blue, line width=2pt] {\val};
      \addplot[blue!50, line width=2pt] {-\val};
      \addplot+[no marks, samples=100, red, line width=2pt] {sin(deg(x))};
      \legend{max.Output Voltage, max.Output Voltage, Clipped Signal}
Click to download: clipped-curve.texclipped-curve.pdf