def grid(self, grid):
if not isinstance(grid, bool):<EOL><INDENT>raise TypeError("<STR_LIT>" % grid)<EOL><DEDENT>self._x_grid = self._y_grid = grid<EOL>
Turns all gridlines on or off

        :param bool grid: turns the gridlines on if ``True``, off if ``False``