Code covered by the BSD License  

Highlights from
imshade

Be the first to rate this file! 20 Downloads (last 30 days) File Size: 1.76 KB File ID: #25691
image thumbnail

imshade

by

 

30 Oct 2009 (Updated )

Plot shaded relief, optionally using simulated lighting direction

| Watch this File

File Information
Description

IMSHADE will plot a matrix representing topography as a 3-component color image, with intensity proportional to the magnitude of the topographic slope of each pixel. Optionally, it can take an argument for lighting angle to use the directional slope.

The current colormap will be used, but future changes in the colormap will not alter the image, since it is now displayed as RGB derived from the colormap and shading.

Nondirectional shading usually scales well, though it is not very robust to spikes in the topographic gradient. The normalization used for directional shading does not always yield satisfactory results and may benefit from some tweaking.

Attached screenshot shows a seamount plotted with IMAGESC (no shaded relief) and with IMSHADE.

MATLAB release MATLAB 7.7 (R2008b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
26 May 2011 Jody Klymak

Looks nice! A more general implementation of something similar can be seen in my submission: http://www.mathworks.com/matlabcentral/fileexchange/14157-shaded-pseudo-color

02 Nov 2009 Gary

"IMSHADE will plot a matrix representing topography as a 3-component color image, with intensity proportional to the magnitude of the topographic slope of each pixel. Optionally, it can take an argument for lighting angle to use the directional slope."

In this case, a picture is worth a thousand words. You should include an example output, as many other File Exchange submissions have done.

Updates
03 Nov 2009

Add a screenshot

03 Nov 2009

Attach corrected screenshot (previous version had incorrect latitude and longitude labels)

Contact us