diff options
author | Camil Staps | 2020-08-30 12:34:59 +0200 |
---|---|---|
committer | Camil Staps | 2020-08-30 12:34:59 +0200 |
commit | 9bc11b74267fe9188bfe3b21e3f2fee25a1d82fd (patch) | |
tree | b26021043c501555a048a1757e328e64bf5fde50 | |
parent | Initial commit (diff) |
Add grid and minor ticks
-rwxr-xr-x | plotasn.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -5,6 +5,7 @@ import csv import datetime as dt import matplotlib.pyplot as plt import matplotlib.dates as mdates +from matplotlib.ticker import AutoMinorLocator import numpy as np class Record: @@ -103,6 +104,8 @@ def plot_files(files): plt.legend() plt.gca().xaxis.set_major_formatter(mdates.DateFormatter('%Y-%m-%d')) plt.gca().set_ylim((0, None)) + plt.gca().yaxis.set_minor_locator(AutoMinorLocator()) + plt.gca().grid(True, which='both', axis='both') plt.gcf().autofmt_xdate() plt.show() |