hslcolormap

버전 1.3 (431 KB) 작성자: Aslak Grinsted
Generate pleasing HSL colormaps easily.
다운로드 수: 1.3K
업데이트 날짜: 2015/2/4

라이선스 보기

Generate hue-saturation-lightness colormaps

USAGE: hslcolormap(N,H,S,L)

INPUTS:
N: number of colors in colormap.
H: hue stops (optional). %can also be specified using a string: rygcbmRYGCBM
S: saturation stops (optional)
L: Lightness stops (optional)

The stops are placed evenly over the colorscale. Parameter examples:
H=[0 1/6]; %colorscale runs from red to yellow
S=[0 1]; %gray to fully saturated
L=[.3 1 .3]; % dark-bright-dark

Using L with two-stops (e.g. L=[.2 .8]) makes it easy to distinguish
high and low values.

Using a symmetric L with 3 stops (e.g. L=[.2 1 .2]) is useful for divergent
colorscales.

Discontinuities in the colormap can be indicated with nans.


EXAMPLE:
surf(peaks(200),'edgecolor','none');
caxis([-6 6])
hslcolormap(300,'g.m',1,[.1 1 .1]);
colorbar




(c) Aslak Grinsted 2014

인용 양식

Aslak Grinsted (2024). hslcolormap (https://www.mathworks.com/matlabcentral/fileexchange/48586-hslcolormap), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2014b
모든 릴리스와 호환
플랫폼 호환성
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!
버전 게시됨 릴리스 정보
1.3

can now take hue inputs as string. e.g. y=yellow=1/6

1.2.0.0

added discontinuity feature, and added html example

1.1.0.0

added screenshot

1.0.0.0