我正在为行星绘制正确的提升 星历,它们具有周期性的特性:它们达到最大值24,然后再从0开始.当我使用matplotlib绘制这些时,从24到0的"跳跃"是加入,以便我在我的身材上运行水平线:

我怎样才能消除这些线?matplotlib中是否有方法,或者可能是在跳转发生点之间拆分列表的方法.
生成上图的代码:
from __future__ import division
import ephem
import matplotlib
import matplotlib.pyplot
import math
fig, ax = matplotlib.pyplot.subplots()
ax.set(xlim=[0, 24])
ax.set(ylim=[min(date_range), max(date_range)])
ax.plot([12*ep.ra/math.pi for ep in [ephem.Jupiter(base_date + d) for d in date_range]], date_range,
ls='-', color='g', lw=2)
ax.plot([12*ep.ra/math.pi for ep in [ephem.Venus(base_date + d) for d in date_range]], date_range,
ls='-', color='r', lw=1)
ax.plot([12*ep.ra/math.pi for ep in [ephem.Sun(base_date + d) for d in date_range]], date_range,
ls='-', color='y', lw=3)
Run Code Online (Sandbox Code Playgroud)