from pylab import * def circ(r): C = [] for c in r: if c < 1: C.append(1) elif c == 1: C.append(0.5) else: C.append(0) C = array(C) plot(C) return C