othercolor

버전 1.7.0.0 (186 KB) 작성자:
Extra colormaps for plotting. Contains diverging, sequential, categorical, and perceptual maps.
다운로드 수: 10.8K
업데이트 날짜: 2011/3/2

라이선스 보기

This is an embarrassingly simple function to augment the currently available MATLAB colormaps. It works as a seamless replacement for the current maps like jet and hsv. So to use it you just call colormap(othercolor('colorname')). The function handles interpolating to any number of points (othercolor('colorname',numpoints)) and uses the current axis as the reference if numpoints is not specified.

The available maps are stored in the file colorData.mat and you can easily add your own maps. To get a list of available names just call othercolor() without any arguments.

The 400+ colormaps are from 3 sources:
Mathematica (indexed, physical, gradient, and named)
http://geography.uoregon.edu/datagraphics/color_scales.htm
http://www.colorbrewer2.org

Some of these maps are better suited for sets of bar or line plots (particularly the qualitative sets). In those cases the last number in the name is the number of indexed colors, so it would probably be fitting to set M to that number to avoid interpolation. Example:

>> figure
>> colorscheme = othercolor('Set16',6);
>> set(gcf,'DefaultAxesColorOrder',colorscheme);
>> plot(rand(6,20));
>> legend(num2str((1:6)'))

* I'm looking for ideas on how to best organize these maps now that there are 400+ of them. If you have suggestions please leave them in the comments or send me an email.

인용 양식

Joshua Atkins (2024). othercolor (https://www.mathworks.com/matlabcentral/fileexchange/30564-othercolor), MATLAB Central File Exchange. 검색됨 .

개발 환경: R2010a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Colormaps에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

othercolor/

버전 게시됨 릴리스 정보
1.7.0.0

Added all the colormaps from Mathematica.
Note: the "physical" and "gradient" maps are Mathematica functions, so they were sampled at 64 linearly spaced rgb points from 0 to 1 to fit with the MATLAB default.

1.6.0.0

Included Oleg's suggestion to get rid of eval() statements.
Added ability to index colors numerically.
Added 200+ new colormaps from colorbrewer2.org
Added image files with pictures of the colormaps.

1.0.0.0