Add --titles option

This commit is contained in:
sharkdp committed 2020-04-13 08:28:29 +02:00
1 parent c649d8d569
commit ca81ab2f91
1 file changed
+6
+6
View File
@@ -21,6 +21,9 @@ parser.add_argument(
parser.add_argument(
"--log-time", help="Use a logarithmic time axis", action="store_true"
)
parser.add_argument(
"--titles", help="Comma-separated list of titles for the plot legend"
)
args = parser.parse_args()
@@ -45,4 +48,7 @@ else:
if args.log_x:
plt.xscale("log")
if args.titles:
plt.legend(args.titles.split(","))
plt.show()