Commit 791a1d45 authored by Mario Hock's avatar Mario Hock
Browse files

New option: "--legend-col-number"

Adjust number of columns in the legend
parent 08c5e962
......@@ -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='*',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment