Mathematica中文论坛-非官方

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 6749|回复: 0
打印 上一主题 下一主题

豆粑粑 matlab use matplotlib colormap

[复制链接]

529

主题

598

帖子

3012

积分

论坛元老

Rank: 8Rank: 8

积分
3012
跳转到指定楼层
楼主
发表于 2017-9-4 09:43:58 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

matlab import matplotlib colormap.
using "DrosteEffect-Colormaps-from-MatPlotLib2.0"


  1. fi_path= '/home/mm/works/work_matlab/mm_functions/DrosteEffect-Colormaps-from-MatPlotLib2.0/';
  2. fi_list=dir([fi_path,'*.m']);

  3. n_colmap= length(fi_list);

  4. [x,y,z]=peaks(30);

  5. sbp_width=0.9;
  6. sbp_heig=0.85;
  7. n_row = 3;
  8. n_col = 3;
  9. [out_pos]=fun_mm_subplot_pos(n_row,n_col,sbp_width,sbp_heig);
  10. h=figure(1)
  11. set(h, 'Position', [100, 100, 1200, 900]);


  12. for i = 1:n_colmap
  13.     ax=axes('position',out_pos(i,:));
  14.     surf(x,y,z,'edgecolor','none');
  15.     axis tight
  16.     col = fi_list(i).name;
  17.     col(end-1:end)=[];
  18. %     colormap(ax(i),col)
  19.     eval(['col_m=',col,'(16);']);
  20.     colormap(ax,col_m)
  21.     colorbar
  22.     title([col,'MPL'])
  23. end

  24. ax=axes('position',out_pos(9,:));
  25.     surf(x,y,z,'edgecolor','none');
  26.     axis tight
  27.     colormap(ax,'parula')
  28.     colorbar
  29.     title(['parula'])
  30. colorbar

  31. h=gcf;
  32. fig_na = './fig_col_name';
  33. fun_work_li_035_myfig_out(h,fig_na,3)
复制代码



DrosteEffect-Colormaps-from-MatPlotLib2.0-f506493.zip

28.91 KB, 下载次数: 0

matplotlib

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|Mathematica中文论坛-非官方 ( 辽ICP备16001491号-1

GMT+8, 2024-4-20 06:25 , Processed in 0.117749 second(s), 28 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表