def __init__(self,pos,text,color=None,font=None): Mark.__init__(self,pos) self.text = text if color is None: color = black self.color = color if font is None: font = '9x15' self.font = glutFont(font)
def __init__(self,pos,val,font='9x15'): """Create a number list. pos is an (N,3) array of positions. val is an (N,) array of marks to be plot at those positions. While intended to plot integer numbers, val can be any object that allows index operations for the required length N and allows its items to be formatted as a string. """ if len(val) < len(pos): raise ValueError,"Not enough values for positions" Mark.__init__(self,pos) self.val = val self.font = glutFont(font)
def __init__(self,pos,text,font='9x15'): Mark.__init__(self,pos) self.text = text self.font = glutFont(font)