提交 1199b9ce 编写于 作者: D Dong Li 提交者: Jiangtao Hu

tools: allow to save result to image, more friendly for remote users

上级 39eec649
......@@ -106,6 +106,12 @@ if __name__ == '__main__':
action='store',
nargs="+",
help="The planning results")
parser.add_argument(
"--figure",
action='store',
type=str,
help="Save the planning results to picture, if not set, show on screen"
)
g_args = parser.parse_args()
matplotlib.rcParams['legend.fontsize'] = 10
......@@ -119,4 +125,8 @@ if __name__ == '__main__':
for planning_file in g_args.planning_files:
plot_planning(ax, planning_file)
if g_args.figure:
plt.savefig(g_args.figure)
print("picture saved to %s" % g_args.figure)
else:
plt.show()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册