| matlab import matplotlib colormap.
 using "DrosteEffect-Colormaps-from-MatPlotLib2.0"
 
   
 
 复制代码fi_path= '/home/mm/works/work_matlab/mm_functions/DrosteEffect-Colormaps-from-MatPlotLib2.0/';
fi_list=dir([fi_path,'*.m']);
n_colmap= length(fi_list);
[x,y,z]=peaks(30);
sbp_width=0.9;
sbp_heig=0.85;
n_row = 3;
n_col = 3;
[out_pos]=fun_mm_subplot_pos(n_row,n_col,sbp_width,sbp_heig);
h=figure(1)
set(h, 'Position', [100, 100, 1200, 900]);
for i = 1:n_colmap
    ax=axes('position',out_pos(i,:));
    surf(x,y,z,'edgecolor','none');
    axis tight
    col = fi_list(i).name;
    col(end-1:end)=[];
%     colormap(ax(i),col)
    eval(['col_m=',col,'(16);']);
    colormap(ax,col_m)
    colorbar
    title([col,'MPL'])
end
ax=axes('position',out_pos(9,:));
    surf(x,y,z,'edgecolor','none');
    axis tight
    colormap(ax,'parula')
    colorbar
    title(['parula'])
colorbar
h=gcf;
fig_na = './fig_col_name';
fun_work_li_035_myfig_out(h,fig_na,3)
 
 
 |