Skip to content

Commit 71227aa

Browse files
authored
Merge pull request #173 from EgorBu/master
Fix the behavior of mode `all`
2 parents 40d8ffd + ebc6ba8 commit 71227aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

labours.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ def plot_churn_matrix(args, repo, people, matrix):
847847
pos1 = ax.get_position()
848848
pos2 = (pos1.x0 + 0.15, pos1.y0 - 0.1, pos1.width * 0.9, pos1.height * 0.9)
849849
ax.set_position(pos2)
850-
if args.mode == "all":
850+
if args.mode == "all" and args.output:
851851
output = get_plot_path(args.output, "matrix")
852852
else:
853853
output = args.output
@@ -863,7 +863,7 @@ def plot_ownership(args, repo, names, people, date_range, last):
863863
data = locals().copy()
864864
del data["args"]
865865
data["type"] = "ownership"
866-
if args.mode == "all":
866+
if args.mode == "all" and args.output:
867867
output = get_plot_path(args.output, "people")
868868
else:
869869
output = args.output
@@ -885,7 +885,7 @@ def plot_ownership(args, repo, names, people, date_range, last):
885885
legend = pyplot.legend(loc=legend_loc, fontsize=args.font_size)
886886
apply_plot_style(pyplot.gcf(), pyplot.gca(), legend, args.background,
887887
args.font_size, args.size)
888-
if args.mode == "all":
888+
if args.mode == "all" and args.output:
889889
output = get_plot_path(args.output, "people")
890890
else:
891891
output = args.output

0 commit comments

Comments
 (0)