diff --git a/matlab/TCV_IMAS/plot_connection_matrices.m b/matlab/TCV_IMAS/plot_connection_matrices.m
index 0d452f90fe356a52ca1739dc570c2b14ac843d64..4bc6f606d8e7c00dd683afc59a2d88dcd157015c 100644
--- a/matlab/TCV_IMAS/plot_connection_matrices.m
+++ b/matlab/TCV_IMAS/plot_connection_matrices.m
@@ -42,9 +42,9 @@ for kk=1:info_pf_active.ntotcircuits
     xlab{index} = [addcolor info_pf_active.coil{ii}.name 'in'];
     index = index +1;
     xlab{index} = [addcolor info_pf_active.coil{ii}.name 'out'];
-  end
   
-  shg
+xlab = strrep(xlab,'_','\_'); % since we need the TeX interpreter for colors
+
   axis ij
   ax = gca;
   colormap(bone(2))