def background (self):
        if not self.settings.bg:
            return
        numBars = self.settings.bgBars
        color1 = self.settings.bgColor1
        color2 = self.settings.bgColor2
        if self.settings.bgBarDir == 'vertical':
            barHeight =self.canvas.height
            barWidth = self.canvas.width / float (numBars)
            offsetW = 1.0
            offsetH = 0
        else:    
            barHeight = self.canvas.height / float (numBars)
            barWidth = self.canvas.width
            offsetW = 0
            offsetH = 1.0
        
            
        for i in range (numBars):
            rect = Rectangle (x = (self.canvas.x + barWidth * float(i) * offsetW),
                              y = (self.canvas.y + barHeight * float(i) * offsetH),
                              width = barWidth,
                              height = barHeight)
            if i % 2 == 0:
                fill = color1
            else:
                fill = color2
            rect.style.fill = fill
            rect.style.strokeWidth = 0
            rect.style.opacity = .35
            self.dataGroup.drawAt (rect, 0)
dataset/ETHPy150Open dotskapes/dotSkapes/modules/savage/graph/base.py/UnifiedGraph.background/original