White boxes in the legend
Afficher commentaires plus anciens
Hello, I'm a beginner with Matlab and I need some help with this code. The problem is the legend, as you can see in the jpeg(the white boxes). In this case I used only two files but the result is the same with more files. Can you help me, please?
for j=1:numel(files)
%% I set a,b,c this way because I want to change the color form blue to red, whatever it is the number of files
a=(1/numel(files))*j;
b=((8/(numel(files)^2))-(12/(numel(files))^2))*(j^2)+(4/numel(files))*j;
c=1-a;
figure(4);
subplot(2,2,1);
sphere; h = findobj('Type','surface');
axis equal;
hold on;
%%%% Add the point due to my analysis
scatter3(X_ps,Y_ps,Z_ps,sz,'MarkerEdgeColor',[a b c],...
'MarkerFaceColor',[a b c]); view(0,90)
subplot(2,2,2)
sphere; h = findobj('Type','surface');
axis equal;
hold on;
scatter3(X_ps,Y_ps,Z_ps,sz,'MarkerEdgeColor',[a b c],...
'MarkerFaceColor',[a b c]); view(0,0)
subplot(2,2,3)
sphere; h = findobj('Type','surface');
axis equal;
set(h, 'FaceColor','none','EdgeColor',[.7,.7,.7]);
hold on;
scatter3(X_ps,Y_ps,Z_ps,sz,'MarkerEdgeColor',[a b c],...
'MarkerFaceColor',[a b c]); view(90,0)
hold on;
end
%%%% Legend display
legend('T=4K','T=25K','T=50K','T=75K','T=100K','T=125K','T=150K');
newPosition = [0.6 0.2 0.2 0.2];
set(legend,'Position', newPosition);
Réponses (0)
Catégories
En savoir plus sur Legend dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!