mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-10-28 16:18:57 +00:00
Change parameter name in plotting scripts
Change the parameter `imagname` to `output` and provide `-o` shortcut.
This commit is contained in:
1 parent
b04a9ec6c4
commit
49fcc4be37
3 files changed
+17
-9
No files matched your search
@@ -18,7 +18,10 @@ parser.add_argument("--title", help="Plot Title")
|
||||
parser.add_argument(
|
||||
"--labels", help="Comma-separated list of entries for the plot legend"
|
||||
)
|
||||
parser.add_argument("--imgname", help="Save image to the given filename.")
|
||||
parser.add_argument(
|
||||
"-o", "--output", help="Save image to the given filename."
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
with open(args.file) as f:
|
||||
@@ -42,7 +45,7 @@ if args.title:
|
||||
plt.legend(handles=boxplot["boxes"], labels=labels, loc="best", fontsize="medium")
|
||||
plt.ylabel("Time [s]")
|
||||
plt.ylim(0, None)
|
||||
if args.imgname:
|
||||
plt.savefig(args.imgname)
|
||||
if args.output:
|
||||
plt.savefig(args.output)
|
||||
else:
|
||||
plt.show()
|
||||
Reference in new issue
Block a user