Chapter 4, example 1

Here, we show basic plotting examples with Matplotlib.

We first plot a white noise signal, consisting of independent normal random values.


In [1]:
y = randn(1000)

In [2]:
plot(y)


Out[2]:
[<matplotlib.lines.Line2D at 0x4cf4cf0>]

We can also specify the x values, which just changes the x axis here.


In [3]:
x = linspace(0., 1., 1000)

In [4]:
plot(x, y)


Out[4]:
[<matplotlib.lines.Line2D at 0x5147670>]