(output_pred, output_gt, fig_path)
| 7 | linestyle_ls = [':', '-', '-', '-.', ':', '-', '-.', '--'] |
| 8 | |
| 9 | def plot2d(output_pred, output_gt, fig_path): |
| 10 | plt.rcParams['axes.facecolor'] = 'w' |
| 11 | plt.rcParams['savefig.facecolor'] = 'w' |
| 12 | plt.rcParams['grid.color'] = '#C0C0C0' |
| 13 | plt.rcParams['pdf.fonttype'] = 42 |
| 14 | plt.rcParams['ps.fonttype'] = 42 |
| 15 | plt.rcParams['font.size'] = 18 |
| 16 | |
| 17 | pred_x, pred_y = output_pred[:, 3], output_pred[:, 7] |
| 18 | plt.plot(pred_x, pred_y, linestyle=linestyle_ls[0], linewidth=lw, label='Prediction') |
| 19 | gt_x, gt_y = output_gt[:, 3], output_gt[:, 7] |
| 20 | plt.plot(gt_x, gt_y, linestyle=linestyle_ls[1], linewidth=lw, label='Ground_truth') |
| 21 | |
| 22 | # plt.gca().set_aspect("equal") |
| 23 | plt.legend(loc='best', ncol=1) |
| 24 | plt.xlabel("X (m)") |
| 25 | plt.ylabel("Y (m)") |
| 26 | # plt.show() |
| 27 | plt.savefig(fig_path, bbox_inches='tight') |
| 28 | plt.close() |
| 29 | |
| 30 | |
| 31 | def plot2d_multi(output_dict, fig_path, labels, color_sink, lw=5, ncol=2): |
nothing calls this directly
no outgoing calls
no test coverage detected