Răsfoiți Sursa

plot title, minor ticks

George C. Privon 11 ani în urmă
părinte
comite
477018a3bb
1 a modificat fișierele cu 4 adăugiri și 0 ștergeri
  1. 4 0
      email_stats.py

+ 4 - 0
email_stats.py

@@ -11,12 +11,16 @@ parser = argparse.ArgumentParser()
 parser.add_argument('mbox', help='Mailbox to analyze.')
 parser.add_argument('--plotfile', '-p', default=False, action='store',
                     help='Name of output plotting file.')
+parser.add_argument('--title', '-t', default='Email Send Times',
+                    action='store', help='Plot title.')
 args = parser.parse_args()
 
 plt.figure()
 plt.ylim([0, 24])
 plt.ylabel('Hour')
 plt.xlabel('Date')
+plt.minorticks_on()
+plt.title(args.title)
 a = mailbox.mbox(args.mbox)
 for msg in a:
     if msg['date'] is not None: