diff --git a/cnl_file_plot.py b/cnl_file_plot.py index 7ef334a37a637dc33e36bcd1506073859a752473..c67596fc160cf1f41cc71d132d5f4cea80794f15 100755 --- a/cnl_file_plot.py +++ b/cnl_file_plot.py @@ -123,7 +123,7 @@ def plot_net(ax, cnl_file, args): #fontsize=layout.fontsize.legend ) else: - l = ax.legend(loc=args.legend_pos) + l = ax.legend(loc=args.legend_pos, ncol=args.legend_col_number) ax.set_xlim(xmin=args.x_min) @@ -320,6 +320,9 @@ if __name__ == "__main__": parser.add_argument("-l", "--legend-pos", type=int, help="see: http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.legend") + parser.add_argument("-ncols", "--legend-col-number", type=int, default=1, + help="see: http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.legend") + ## subplots parser.add_argument("-sub", "--subplots", type=str, nargs='*',