def __init__(self, desc=None): YCategoryAxis.__init__(self) self.desc = None if isString(desc) is True: self.desc = desc self.labels.fontName = DefaultFontName
def makeTickLabels(self): g = YCategoryAxis.makeTickLabels(self) desc_text = make_desc_test(self, "Y") if desc_text is not None: g.add(desc_text) return g
def sample7d(): "Sample drawing, xvalue/ycat axes, y connected at 200 pts to x." drawing = Drawing(400, 200) data = [(10, 20, 30, 42)] xAxis = XValueAxis() xAxis._length = 300 xAxis.configure(data) yAxis = YCategoryAxis() yAxis.setPosition(50, 50, 125) yAxis.joinAxis = xAxis yAxis.joinAxisMode = 'points' yAxis.joinAxisPos = 200 yAxis.categoryNames = ['Beer', 'Wine', 'Meat', 'Cannelloni'] yAxis.labels.boxAnchor = 'e' yAxis.configure(data) drawing.add(xAxis) drawing.add(yAxis) return drawing