diff --git a/eodb/events/management/commands/activity.py b/eodb/events/management/commands/activity.py index 0c777f9..cd818fb 100644 --- a/eodb/events/management/commands/activity.py +++ b/eodb/events/management/commands/activity.py @@ -51,5 +51,7 @@ class Command(GraphCommand): values = [events[x] for x in dates] plt.bar(dates, values, width=20) + plt.gca().xaxis.set_major_locator(matplotlib.dates.YearLocator()) + plt.gca().xaxis.set_minor_locator(matplotlib.dates.MonthLocator()) plt.gca().xaxis.set_major_formatter(matplotlib.dates.DateFormatter('%m/%Y')) self.plot(options) diff --git a/eodb/events/management/commands/times.py b/eodb/events/management/commands/times.py index 28f73b9..8886983 100644 --- a/eodb/events/management/commands/times.py +++ b/eodb/events/management/commands/times.py @@ -19,6 +19,8 @@ class Command(GraphCommand): event_times.append(graph_date.hour + graph_date.minute / 60. + graph_date.second / 3600) plt.scatter(event_dates, event_times, alpha=0.3) + plt.gca().xaxis.set_major_locator(matplotlib.dates.YearLocator()) + plt.gca().xaxis.set_minor_locator(matplotlib.dates.MonthLocator()) plt.gca().xaxis.set_major_formatter(matplotlib.dates.DateFormatter('%m/%Y')) plt.gca().set_ylim([0, 24]) plt.yticks(range(24))