Ejemplo n.º 1
0
 def __init__(self, bb_center=None, maximum=5, ticks=10, colorCenterLine='#aaa', colorGrid='#ddd'):
     super().__init__(bb_center)
     self.maximum = maximum
     axis_start, axis_end, nice_tick = self.nice_bounds(-maximum, maximum, 2 * ticks)
     self.step = nice_tick
     self.size = axis_end - axis_start
     self.grid = GridHelper(
         self.size, int(self.size / self.step), colorCenterLine=colorCenterLine, colorGrid=colorGrid)
     self.set_center(True)
 def __init__(
     self,
     bb_center=None,
     maximum=5,
     ticks=10,
     colorCenterLine="#aaa",
     colorGrid="#ddd",
 ):
     Helpers.__init__(self, bb_center)
     axis_start, axis_end, nice_tick = _nice_bounds(-maximum, maximum,
                                                    2 * ticks)
     self.step = nice_tick
     self.size = axis_end - axis_start
     self.grid = GridHelper(
         self.size,
         int(self.size / self.step),
         colorCenterLine=colorCenterLine,
         colorGrid=colorGrid,
     )
     self.set_center(True)