|
@@ -39,6 +39,10 @@ parser.add_argument('--title', '-t', default='',
|
|
|
parser.add_argument('--sendercolors', '-s', default=False, action='store',
|
|
parser.add_argument('--sendercolors', '-s', default=False, action='store',
|
|
|
help='Comma separated list of search strings for the \
|
|
help='Comma separated list of search strings for the \
|
|
|
sender field. Each will be displayed with a different color.')
|
|
sender field. Each will be displayed with a different color.')
|
|
|
|
|
+parser.add_argument('--work_hours', action='store',
|
|
|
|
|
+ default=None,
|
|
|
|
|
+ help='If provided, shade work hours. Comma-separated \
|
|
|
|
|
+list.')
|
|
|
parser.add_argument('--domains', '-d', action='store',
|
|
parser.add_argument('--domains', '-d', action='store',
|
|
|
default='gmail,hotmail,aol,comcast,yahoo',
|
|
default='gmail,hotmail,aol,comcast,yahoo',
|
|
|
help='Comma separated list of domains to use in \
|
|
help='Comma separated list of domains to use in \
|
|
@@ -121,7 +125,7 @@ if len(pldata['unknown']) > 0:
|
|
|
color=viridis(1),
|
|
color=viridis(1),
|
|
|
marker='.',
|
|
marker='.',
|
|
|
#tz=z.tzname(),
|
|
#tz=z.tzname(),
|
|
|
- label='unknown',
|
|
|
|
|
|
|
+ label=None,
|
|
|
alpha=0.3,
|
|
alpha=0.3,
|
|
|
xdate=True)
|
|
xdate=True)
|
|
|
|
|
|
|
@@ -131,6 +135,17 @@ if args.sendercolors:
|
|
|
ax.tick_params(axis='x',
|
|
ax.tick_params(axis='x',
|
|
|
labelrotation=90)
|
|
labelrotation=90)
|
|
|
|
|
|
|
|
|
|
+if args.work_hours:
|
|
|
|
|
+ work = [float(x) for x in args.work_hours.split(',')]
|
|
|
|
|
+ ax.fill_between(ax.get_xlim(),
|
|
|
|
|
+ y1=work[0],
|
|
|
|
|
+ y2=work[1],
|
|
|
|
|
+ color='gray',
|
|
|
|
|
+ alpha=0.3,
|
|
|
|
|
+ label='Work Hours')
|
|
|
|
|
+ ax.legend(loc='best',
|
|
|
|
|
+ fontsize='small')
|
|
|
|
|
+
|
|
|
if args.plotroot:
|
|
if args.plotroot:
|
|
|
fig.savefig(args.plotroot + '-send_times.png',
|
|
fig.savefig(args.plotroot + '-send_times.png',
|
|
|
bbox_inches='tight')
|
|
bbox_inches='tight')
|