Plotting contours from a shapefile on top of raster data (which were plotted using surf)
Show older comments
I would like to plot subcatchment contours (which I have read using shaperead) on top of a precipitation map I have plotted using surf. If I only plot the contours they appear in the figure (e.g. if I put a breakpoint in the code below before plotting the precipitation maps), however if I first plot the precipitation map, the contours don't show. Does anybody have an idea, what the problem is? Many thanks, Doris
This is the code I use:
figure1 = figure;
axes1 = axes('Parent',figure1);
xlim(axes1,[xmin xmax]);
ylim(axes1,[ymin ymax]);
caxis([0 200]);
hold(axes1,'all');
% plot subbasin contours
plot([S.X],[S.Y], 'k');
% plot precipitation map
surf(dem_x,dem_y,precip_map);
shading flat
view(0,90)
hold on;
% plot subbasin contours
plot([S.X],[S.Y], 'k');
Accepted Answer
More Answers (0)
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!