sky
설명
예제
컬러맵 반전하기
곡면을 플로팅하고, 하늘(sky) 컬러맵을 할당합니다.
surf(peaks)
colormap("sky")
하늘(sky) 컬러맵 배열을 가져오고, 순서를 반전합니다. 그런 다음 수정된 컬러맵을 곡면에 적용합니다.
c = sky; c = flipud(c); colormap(c)
하늘(sky) 컬러맵 다운샘플링하기
20개의 색만 포함된 하늘(sky) 컬러맵의 다운샘플링된 버전을 가져옵니다. 그런 다음 컬러맵과 보간 음영을 적용하여 peaks 함수의 윤곽선을 표시합니다.
c = sky(20);
surf(peaks)
colormap(c)
shading interp
색 개수가 다른 히트맵 비교하기
히트맵 차트는 기본적으로 sky
컬러맵의 256샘플링을 사용합니다. Colormap
이름-값 인수를 지정하여 샘플링을 변경할 수 있습니다.
예를 들어, 2×1 타일 형식 차트 레이아웃에 두 개의 히트맵 차트를 만들어 보겠습니다. 위쪽 차트는 디폴트 256색 집합을 사용하고 아래쪽 차트는 2개의 색만 사용합니다.
tiledlayout(2,1,TileSpacing="compact") % Top chart with default colors nexttile heatmap(magic(10)) % Bottom chart with two colors nexttile heatmap(magic(10),Colormap=sky(2))
입력 인수
m
— 색 개수
256
(디폴트 값) | 음이 아닌 정수
색 개수로, 음이 아닌 정수로 지정됩니다. m
의 디폴트 값은 현재 Figure의 컬러맵에 있는 색 개수입니다. Figure가 없는 경우 디폴트 값은 256
입니다.
데이터형: single
| double
버전 내역
R2023a에 개발됨
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)