Colorbar Plot, mismatched dimensions

1 view (last 30 days)
I am trying to make a 2d plot of distance vs depth with colors representing magnitudes at each (distance,depth) location. I have 2 vectors, distance and depth; size(distance)=210, size(depth)=63, and a 2d array magnitude where size(magnitude)=(210,63). I want a plot that shows the mag at each location with a color. I have tried
surf(distance,depth,magnitude)
set(gca,'cameraposition',[0 0 180])
But this just provides a head-on look at the surface plot which doesn't look right.
Thanks for the help

Accepted Answer

the cyclist
the cyclist on 14 Jul 2013
Maybe the contourf() function would be more suited to what you want to show?
  1 Comment
Jeremy
Jeremy on 17 Jul 2013
Perfect. This is exactly what I needed thank you.

Sign in to comment.

More Answers (0)

Categories

Find more on Colormaps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!