From f0eb3ddcb9ec550ba42ca5cdf648500126cf1610 Mon Sep 17 00:00:00 2001 From: Antoine Merle <antoine.merle@epfl.ch> Date: Mon, 20 Jan 2020 22:50:16 +0100 Subject: [PATCH] Make labels more readable when plotting connection matrix. --- matlab/TCV_IMAS/plot_connection_matrices.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/matlab/TCV_IMAS/plot_connection_matrices.m b/matlab/TCV_IMAS/plot_connection_matrices.m index 0d452f90..d575d048 100644 --- a/matlab/TCV_IMAS/plot_connection_matrices.m +++ b/matlab/TCV_IMAS/plot_connection_matrices.m @@ -44,6 +44,8 @@ for kk=1:info_pf_active.ntotcircuits xlab{index} = [addcolor info_pf_active.coil{ii}.name 'out']; end + xlab = strrep(xlab,'_','\_'); % since we need the tex interpreter for colors + shg axis ij ax = gca; @@ -51,6 +53,6 @@ for kk=1:info_pf_active.ntotcircuits xlabel('Element name. (red) Elemement belonging to circuit. (green) power supplies. (black) coils'); ylabel('Node'); title(['Circuit ' num2str(kk) ': ' info_pf_active.circuit{kk}.name]) - set(ax,'Xtick', xti, 'Ytick', yti, 'XTickLabel', xlab, 'YTickLabel', ylab') + set(ax,'Xtick', xti, 'Ytick', yti, 'XTickLabel', xlab, 'YTickLabel', ylab', 'XTickLabelRotation', 90) end -- GitLab