Skip to content

Commit

Permalink
Merge pull request #158 from aidanmontare-fed/fix-plot-grid
Browse files Browse the repository at this point in the history
fix usage of matplotlib.Axes.grid (fixes #128)
  • Loading branch information
aewallin committed May 4, 2024
2 parents 022fe77 + f8ba163 commit fcac40c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions allantools/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit fcac40c

Please sign in to comment.