How to make land surface black using ETOPO data

조회 수: 2 (최근 30일)
Vince Clementi
Vince Clementi 2017년 7월 20일
편집: Carl 2017년 7월 25일
Hi All,
I'm trying to create an map using ETOPO data that shows ocean bathymetry, but blacks out anything above sea level (i.e., land). For example, the region around New Zealand. I want NZ to be entirely black, and Z to be o (sea level) to the sea floor.
So far, I can only make the land boundaries black using geoshow, but not the entire land surface.
Any ideas?

답변 (1개)

Carl
Carl 2017년 7월 25일
편집: Carl 2017년 7월 25일
Hi Vincent. You can try setting the axes "CLim" property, and using a custom colormap. This will let you set everything above a certain Z value (elevation) to be some color (black). For example:
% After plotting your data with geoshow
clim = get(gca,'CLim');
clim(2) = 0;
set(gca,'CLim',clim)
newmap = colormap;
newmap(end,:) = [0 0 0];
colormap(newmap)
See the documentation below for more on the "CLim" property:
and using colormaps:

카테고리

Help CenterFile Exchange에서 Blue에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by