From: Benjamin R. <ben...@ou...> - 2012-04-04 16:21:09
|
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 > > Put [np.nan] between each complete rotation. Nans in a plot breaks the line. Ben Root |