Skip to content
Snippets Groups Projects
Verified Commit 37cb0f6b authored by STEVAN Antoine's avatar STEVAN Antoine :crab:
Browse files

move "use TeX" to common options

parent f6b3a625
Branches
No related tags found
No related merge requests found
......@@ -117,7 +117,6 @@ if __name__ == "__main__":
plot_parser.add_argument("--y-ticks", type=float, nargs='+', help="the ticks for the Y axis")
plot_parser.add_argument("--y-tick-labels", type=str, nargs='+', help="the tick labels for the Y axis, should be the same length as `--y-ticks`")
plot_parser.add_argument("--font", type=str, default="{}", help="the font parameters")
plot_parser.add_argument("--use-tex", action="store_true")
multi_bar_parser = subparsers.add_parser(
"multi-bar",
......@@ -126,7 +125,6 @@ if __name__ == "__main__":
)
multi_bar_parser.add_argument("data", type=str, nargs="?", help=f"the actual data to show in a multibar plot\n\n{multi_bar.HELP}")
multi_bar_parser.add_argument("--label", "-l", type=str, help="the measurement label of the multibar plot")
multi_bar_parser.add_argument("--use-tex", action="store_true")
common_options = [
{
......@@ -153,6 +151,10 @@ if __name__ == "__main__":
"flags": ["--dpi"],
"kwargs": { "type": int, "default": 500, "help": "the Dots Per Inch (DPI) of the saved image" }
},
{
"flags": ["--use-tex"],
"kwargs": { "action": "store_true" }
},
]
for option in common_options:
plot_parser.add_argument(*option["flags"], **option["kwargs"])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment