From 5c883caf168809adf36995067a1cca548e0db5a5 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Mon, 7 Oct 2019 23:43:01 -0400 Subject: [PATCH] label subplots for each estimator and hyphenate Geman-McClure --- matlab/gtsam_examples/VisualizeMEstimators.m | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/matlab/gtsam_examples/VisualizeMEstimators.m b/matlab/gtsam_examples/VisualizeMEstimators.m index 5120934fe..1c5a14a70 100644 --- a/matlab/gtsam_examples/VisualizeMEstimators.m +++ b/matlab/gtsam_examples/VisualizeMEstimators.m @@ -36,7 +36,7 @@ plot_m_estimator(x, cauchyNoiseModel, rho, 'Cauchy', 3, 'cauchy.png') c = 1.0; rho = gemanmcclure(x, c); gemanmcclureNoiseModel = gtsam.noiseModel.mEstimator.GemanMcClure(c); -plot_m_estimator(x, gemanmcclureNoiseModel, rho, 'GemanMcClure', 4, 'gemanmcclure.png') +plot_m_estimator(x, gemanmcclureNoiseModel, rho, 'Geman-McClure', 4, 'gemanmcclure.png') c = 2.9846; rho = welsch(x, c); @@ -59,15 +59,20 @@ function plot_m_estimator(x, model, rho, plot_title, fig_id, filename) figure(fig_id); subplot(3, 1, 1); - plot(x, rho); + plot(x, rho, 'LineWidth',2); + title('rho function'); xlim([-5, 5]); - title(plot_title); subplot(3, 1, 2); - plot(x, psi); + plot(x, psi, 'LineWidth',2); + title('influence function'); xlim([-5, 5]); subplot(3, 1, 3); - plot(x, w); + plot(x, w, 'LineWidth',2); + title('weight function'); xlim([-5, 5]); + + sgtitle(plot_title, 'FontSize', 26); + saveas(figure(fig_id), filename); end