Skip to content

Commit

Permalink
Codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
paradoxxxzero committed Feb 25, 2016
1 parent 9d70ff3 commit a6835fa
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions pygal/graph/graph.py
Expand Up @@ -893,28 +893,30 @@ def _compute_y_labels_major(self):
else:
self._y_labels_major = []


def add_squares(self, squares):
x_lines = squares[0]-1
y_lines = squares[1]-1

_current_x = 0
_current_y = 0

_squares_coord = []

for line in range(x_lines):
_current_x += (self.width - self.margin_box.x) / squares[0]
self.svg.node(self.nodes['plot'], 'path',
class_='bg-lines',
d='M%s %s L%s %s' % (_current_x, 0, _current_x, self.height-self.margin_box.y))
self.svg.node(
self.nodes['plot'], 'path',
class_='bg-lines',
d='M%s %s L%s %s' % (
_current_x, 0, _current_x, self.height-self.margin_box.y))

for line in range(y_lines):
_current_y += (self.height - self.margin_box.y) / squares[1]
self.svg.node(self.nodes['plot'], 'path',
class_='bg-lines',
d='M%s %s L%s %s' % (0, _current_y, self.width-self.margin_box.x, _current_y))
return ((self.width - self.margin_box.x) / squares[0], (self.height - self.margin_box.y) / squares[1])
self.svg.node(
self.nodes['plot'], 'path',
class_='bg-lines',
d='M%s %s L%s %s' % (
0, _current_y, self.width-self.margin_box.x, _current_y))
return ((self.width - self.margin_box.x) / squares[0],
(self.height - self.margin_box.y) / squares[1])

def _draw(self):
"""Draw all the things"""
Expand Down

0 comments on commit a6835fa

Please sign in to comment.