add option to not include a title

This commit is contained in:
Frédéric Péters 2017-10-15 15:07:57 +02:00
parent 55d1e0bd5d
commit 500e74a9ef
1 changed files with 3 additions and 1 deletions

View File

@ -15,6 +15,7 @@ class GraphCommand(BaseCommand):
help='use commit datetime instead of author datetime')
parser.add_argument('--mailinglist', action='store_true',
help='use mailing list emails instead of commits')
parser.add_argument('--notitle', action='store_true')
parser.add_argument('--filename', metavar='FILENAME')
def get_events(self, options):
@ -55,7 +56,8 @@ class GraphCommand(BaseCommand):
return title
def plot(self, options):
plt.title(self.get_title(options))
if not options.get('notitle'):
plt.title(self.get_title(options))
if options.get('filename'):
plt.savefig(options['filename'])
else: