diff --git a/allantools/plot.py b/allantools/plot.py index 7e36e34..85a201e 100644 --- a/allantools/plot.py +++ b/allantools/plot.py @@ -93,8 +93,12 @@ def plot(self, atDataset, **kwargs) self.ax.set_xlabel("Tau") self.ax.set_ylabel(atDataset.out["stat_id"]) - self.ax.grid(grid, which="minor", ls="-", color='0.65') - self.ax.grid(grid, which="major", ls="-", color='0.25') + + if grid: + self.ax.grid(True, which="minor", ls="-", color='0.65') + self.ax.grid(True, which="major", ls="-", color='0.25') + else: + self.ax.grid(False) def show(self): """Calls matplotlib.pyplot.show()