How to remove vertical lines when plotting rotating phase

Hello,

I'm plotting a rotating phase:

# ipython --pylab
x1 = linspace(0, 2*pi, 30)
x = concatenate((x1,x1,x1,x1))
plot(x)

The resulting plot has ugly vertical lines whenever x wraps from 2*pi
back to zero.

Does someone have a nice, general way to get to get rid of such lines?

(the actual data is of course less predictable and regular than the
example above).

Best,

   -Nikolaus

···

--
»Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C

Put [np.nan] between each complete rotation. Nans in a plot breaks the line.

Ben Root

···

On Wednesday, April 4, 2012, Nikolaus Rath wrote:

Hello,

I’m plotting a rotating phase:

ipython --pylab

x1 = linspace(0, 2*pi, 30)

x = concatenate((x1,x1,x1,x1))

plot(x)

The resulting plot has ugly vertical lines whenever x wraps from 2*pi

back to zero.

Does someone have a nice, general way to get to get rid of such lines?

(the actual data is of course less predictable and regular than the

example above).

Best,

-Nikolaus