注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

一路

To find the final symmetry & beauty

 
 
 

日志

 
 
 
 

Color Map for MATLAB Scientific Figures [Origin]  

2011-04-03 17:22:19|  分类: 计算之美 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

I have created a color map file for drawing scientific figures. Many other people may also find this file useful and now I put it on the web and anyone can download and use it.

Download files here.

http://cid-27156b4de6867efb.office.live.com/self.aspx/Downloads/scimap.rar

The following is the code list and demo picture.

  

function map = scimap(varargin)

 

%filename : scimap.m

%SCIMAP  colormap for scientific figure

%   MAP = scimap

%   return a 256x3 array which can be used with colormap.

%   eg.

%   colormap(scimap);

%   figure;

%   x=-2*pi:0.01:2*pi;

%   y=x;

%   [XX,YY]=meshgrid(x,y);

%   Z=exp(-0.2*sqrt((XX.*XX+YY.*YY)));

%   mesh(XX,YY,Z);

%   view(2);

%

% Author: saturnman

% Website: saturnman.blog.163.com

% Created: 2011-04-3

 

r = zeros(256,1);

g = zeros(256,1);

b = zeros(256,1);

%r(1:96) = zeros(96,1);

r(97:160)=linspace(0,1,64);

r(161:224)=ones(64,1);

r(225:256)=linspace(1,0.5,32);

 

%g(1:32) = zeros(32,1);

g(33:96) = linspace(0,1,64);

g(97:160) = ones(64,1);

g(161:224) = linspace(1,0,64);

%g(225:256) = zeros(32,0);

 

b(1:32) = linspace(0.5,1,32);

b(33:96) = ones(64,1);

b(97:160) = linspace(1,0,64);

%b(161:256) = zeros(96,1);

map = [r g b];

 

function map = scimap(varargin)

 

%filename : scimap.m

%SCIMAP  colormap for scientific figure

%   MAP = scimap

%   return a 256x3 array which can be used with colormap.

%   eg.

%   colormap(scimap);

%   figure;

%   x=-2*pi:0.01:2*pi;

%   y=x;

%   [XX,YY]=meshgrid(x,y);

%   Z=exp(-0.2*sqrt((XX.*XX+YY.*YY)));

%   mesh(XX,YY,Z);

%   view(2);

%

% Author: saturnman

% Website: saturnman.blog.163.com

% Created: 2011-04-3

 

r = zeros(256,1);

g = zeros(256,1);

b = zeros(256,1);

%r(1:96) = zeros(96,1);

r(97:160)=linspace(0,1,64);

r(161:224)=ones(64,1);

r(225:256)=linspace(1,0.5,32);

 

%g(1:32) = zeros(32,1);

g(33:96) = linspace(0,1,64);

g(97:160) = ones(64,1);

g(161:224) = linspace(1,0,64);

%g(225:256) = zeros(32,0);

 

b(1:32) = linspace(0.5,1,32);

b(33:96) = ones(64,1);

b(97:160) = linspace(1,0,64);

%b(161:256) = zeros(96,1);

map = [r g b];

  评论这张
 
阅读(887)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017