Why matlab text () in the figure shows the matrix with my row (special character)

I have a problem with MATLAB: I want to show the text in the picture (the name of the color bar) with special characters as an index, a Greek letter. The index appears in matrix form on the display (see. Images), and I do not understand why.

enter image description here

enter image description here

Has anyone already had this problem and can help me?

I am trying to create a GUI. So my code is long, but I will try to explain to you. I have a G_nom variable that changes when I call another greatness: G_nom = '{\ she \ sigma_u} *';

Next, call the drawing function:

%
function figure_exp_num(source,callbackdata) 


global Grandeur G g Verticale Horizontale EXP_graphique NUM_graphique M
global M_Int G_Num_Int YI ZI Adim x Q position d S U_debit YCercle ZCercle
global cmin cmax cmin_auto cmax_auto Valeur_perso_colorbar G_map  G_nom
global valeur_min_colorbar valeur_max_colorbar f h1 h2 h3 h11 h22 hcb
global y_Num z_Num points_exp points_num Exp_contour Num_contour Exp_contour_1
global Nb_ISO G_nom_indice Titre

%f=figure('units','centimeters','Position',[9 2 25 15],'Visible', 'on','renderer','painters');
clf(f,'reset')
set(f,'Visible','on','Position',[9 2 23 15])

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
h1=subplot(2,2,1,'Parent',f,'units','centimeters');
assignin('base','h1',h1);

% Variable à tracer
%-------------------------------------------------------------------------   
G_map=M_Int(:,:,G);
assignin('base','G_map',G_map);

% Affichage du graphique
%-------------------------------------------------------------------------
h11=pcolor(YI,ZI,G_map);
assignin('base','h11',h11);


% Ajout du Cercle représentant la conduite/ point EXP ou NUM
%-------------------------------------------------------------------------- 
hold on
    plot(YCercle, ZCercle,'k-','LineWidth',4.0);             %Tracé du cercle (conduite)
    points_exp=plot(M(:,2),M(:,3),'k+','Visible', 'off');    %Tracé des points expérimentaux
    [Exp_contour_valeur,Exp_contour]=contour(YI,ZI,G_map,Nb_ISO,'k-',...
        'LineWidth', 1.5,'Visible', 'off');                  %Courbe iso de la grandeur
hold off

assignin('base','Exp_contour',Exp_contour);    
% Caractéristiques du graphique :
%-----------------------------------

% recherche du min et max automatique du graphique
%--------------------------------------------------
[cmin_auto,cmax_auto] = caxis;
assignin('base','cmin_auto',cmin_auto);
assignin('base','cmax_auto',cmax_auto);

cmin=cmin_auto;
cmax=cmax_auto;
assignin('base','cmin',cmin);
assignin('base','cmax',cmax);

% Borne de la colorbar
%------------------------------   
caxis([cmin_auto,cmax_auto])
set(valeur_min_colorbar,'string',num2str(cmin_auto,'%.3f'),...
    'BackgroundColor',[1 0.5 0]);
set(valeur_max_colorbar,'string',num2str(cmax_auto,'%.3f'),...
    'BackgroundColor',[1 0.5 0]);

axis equal;                 % axes de même longueur
axis([min(YCercle)-0.02 max(YCercle)+0.02 min(ZCercle)-0.02 max(ZCercle)+0.02])
shading(gca,'interp')       %lissage de l'interpolation

% Titre du Subplot Expérimentale et des Axes du graphique
%--------------------------------------------------------------------------
title('Exp');

if Adim==1
    xlabel ('\ity*');ylabel ('\itz*');
        set(gca,'YTick',[-0.5:0.1:0.5]) 
        set(gca,'XTick',[-0.5:0.25:1])
else
    xlabel ('y (mm)');ylabel ('z (mm)');
end


h2=subplot(2,2,2,'Parent',f,'units','centimeters');
assignin('base','h2',h2);

%Variable à tracer et GRAPH
%------------------------------------------------------------------------- 
h22=pcolor(YI,ZI,G_Num_Int(:,:,g));
assignin('base','h22',h22);

% Ajout du Cercle représentant la conduite/ point EXP ou NUM
%--------------------------------------------------------------------------        
hold on
    plot(YCercle, ZCercle,'k-','LineWidth',4.0);            %Tracé du cercle (conduite)
    points_num=plot(y_Num,z_Num,'k+','Visible', 'off');     %Tracé des points numérique
    [Num_contour_valeur,Num_contour] = contour(YI,ZI,G_Num_Int(:,:,g),Nb_ISO,'k-','LineWidth', 1.5,'Visible','off');            %Courbe iso de la grandeur
hold off
assignin('base','Num_contour',Num_contour);

% Caractéristiques du graphique
%--------------------------------------------------------------------------
    axis equal;
    axis([min(YCercle)-0.02 max(YCercle)+0.02 min(ZCercle)-0.02 max(ZCercle)+0.02]);
    shading interp;
% min et max de la colorbar du graphique = à celui de l'EXP
%-----------------------------------------------------------     
    caxis([cmin,cmax])

% Titre du Subplot Expérimentale et des Axes du graphique
%------------------------------------------------------------

    title('Num');
    if Adim==1
        xlabel ('\ity*');ylabel ('\itz*');
            set(gca,'YTick',[-0.5:0.1:0.5]) 
            set(gca,'XTick',[-0.5:0.25:1])
    else
        xlabel ('y (mm)');ylabel ('z (mm)');
    end


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
h3=subplot(2,2,[3 4],'Parent',f,'units','centimeters');
assignin('base','h3',h3);

axis off;                       %N'affiche pas le graphique
caxis([cmin,cmax])              %borne de la colorbar
hcb=colorbar('southoutside');   %Orientation de la colorbar

title(hcb,G_nom);               %titre de la colorbar
%ylabel(hcb,G_nom);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Positionnement des subplots dans la fenêtre graphique
%------------------------------------------------------
set(h1,'position',[2,5.5,10,8])     %Position du Subplot1 : Exp
set(h2,'position',[13,5.5,10,8])    %Position du Subplot2 : Num
set(h3,'position',[3,3.2,18.6,5])       %Position du Subplot3 : 
end
+4
source share
2 answers

, Windows colormap . , , , ( ):

set(gcf, 'Renderer', 'OpenGL');
opengl software;
+2

OpenGL, , . , ...

'Renderer' 'RendererMode' . 'RendererMode' 'auto', , MATLAB , . , - , OpenGL , ('painters' 'zbuffer') . .. MATLAB 'painters', OpenGL, 'zbuffer' .

OpenGL opengl. , OpenGL. ? , , , , . - , , MATLAB , , ( , , ).

, , - OpenGL, , , - . , , ( ).

, , MATLAB OpenGL . , opengl (, MATLAB) startup.m file:

opengl software
+2

All Articles