Skip to content

Commit

Permalink
Added "skip_plt_show" arg to plotter
Browse files Browse the repository at this point in the history
Signed-off-by: Shintaro Sakoda <[email protected]>
  • Loading branch information
SakodaShintaro committed Oct 22, 2024
1 parent 8bb8b1e commit 723d70b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def __init__(self, args, ylabel, output_suffix):
self.ymax = args.ymax
self.number_of_plot = args.number_of_plot
self.save_result = args.save_result
self.skip_plt_show = args.skip_plt_show
self.ylabel = ylabel
self.output_suffix = output_suffix

Expand Down Expand Up @@ -174,7 +175,8 @@ def run(self):
# save figure of plot
plt.savefig(f"./result/{output_name}-{timestamp}.png")

plt.show()
if not self.skip_plt_show:
plt.show()


def create_common_argment(ymax=None):
Expand All @@ -193,6 +195,9 @@ def create_common_argment(ymax=None):
parser.add_argument(
"-s", "--save-result", default=False, action="store_true", help="whether to save result"
)
parser.add_argument(
"-p", "--skip_plt_show", default=False, action="store_true", help="whether to skip plt.show()"
)

args = parser.parse_args()

Expand Down

0 comments on commit 723d70b

Please sign in to comment.