From e5b656abf59d24036ace0843f74d2352df656f98 Mon Sep 17 00:00:00 2001
From: Marco Ratto <marco.ratto@ec.europa.eu>
Date: Tue, 25 Jan 2022 10:34:27 +0100
Subject: [PATCH] plot_shock_decomposition: filter out other forbidden
 characters (parentheses and dot) for field name

(cherry picked from commit 16bc2b3e5e4455376ea61c146d4a4ce4c423787b)
---
 matlab/expand_group.m | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/matlab/expand_group.m b/matlab/expand_group.m
index 59945f00a4..f8e326b390 100644
--- a/matlab/expand_group.m
+++ b/matlab/expand_group.m
@@ -46,6 +46,9 @@ options.nobs=mydata.nobs;
 label = mydata.shock_group.label;
 label = strrep(label,' ','_');
 label = strrep(label,'-','_');
+label = strrep(label,'(','');
+label = strrep(label,')','');
+label = strrep(label,'.','');
 shocks = mydata.shock_group.shocks;
 options.plot_shock_decomp.fig_name = [mydata.fig_name '. Expand'];
 options.plot_shock_decomp.use_shock_groups = label; %[use_shock_groups_old int2str(ic)];
-- 
GitLab