def _matplotlib_list(interval_list):
 xlist = []
 ylist = []
 if len(interval_list):
  for intervals in interval_list:
   intervalx = intervals[0]
   intervaly = intervals[1]
   xlist.extend([intervalx.start, intervalx.start, intervalx.end, intervalx.end, None])
   ylist.extend([intervaly.start, intervaly.end, intervaly.end, intervaly.start, None])
 else:
  xlist.extend([None, None, None, None])
  ylist.extend([None, None, None, None])
 return (xlist, ylist)

def _matplotlib_list ( interval_list ) : xlist = [ ] ylist = [ ] if len ( interval_list ) : for intervals in interval_list : intervalx = intervals [ 0 ] intervaly = intervals [ 1 ] xlist . extend ( [ intervalx . start , intervalx . start , intervalx . end , intervalx . end , None ] ) ylist . extend ( [ intervaly . start , intervaly . end , intervaly . end , intervaly . start , None ] ) else : xlist . extend ( [ None , None , None , None ] ) ylist . extend ( [ None , None , None , None ] ) return ( xlist , ylist )
returns lists for matplotlib fill command from a list of bounding rectangular intervals .