"""
Plot the raw signal and its envelope
"""
@userplot EnvelopePlot
@recipe function f(e::EnvelopePlot)
    x,y = e.args
    z = abs.(hilbert(y))
    zeroline = zeros(length(x))

    legend --> false
    grid --> false
    linecolor := [:grey :black :black]
    linewidth := [0.5 2 0.7]
    linestyle := [:solid :solid :dash]

    dpi --> 300
    size --> (800,600)

    @series begin
        seriestype := :line
        x, [y z zeroline]
    end
end
