From: Li on 30 Jun 2010 11:33 I am plotting a vertical distribution of water temperature, and want to add a thermocline at the temperature of 20 oC. Below is my code: [C, h] = contourf (X, Y, Z, [0: 0.1: 30], 'LineStyle', 'none' ); %X Y Z are gridded data. hold on; [C2, h2] = contour (X, Y, Z, [20 20], 'k-', 'linewidth', 2); fill ( Distance2, Depth2, [0.7 0.7 0.7] ); I do not want to show plots deeper than the ocean floor, so I am using 'fill' to cover it up. My question is why the 'fill' function can cover anything from the 'contourf' plot, but not the line plotted from 'contour'? Thank you.
From: Li on 1 Jul 2010 10:20 I found the answer: set(gcf, 'renderer', 'painters'); "Li " <liqingjiang(a)gmail.com> wrote in message <i0fo3g$t6i$1(a)fred.mathworks.com>... > I am plotting a vertical distribution of water temperature, and want to add a thermocline at the temperature of 20 oC. Below is my code: > > [C, h] = contourf (X, Y, Z, [0: 0.1: 30], 'LineStyle', 'none' ); %X Y Z are gridded data. > hold on; > [C2, h2] = contour (X, Y, Z, [20 20], 'k-', 'linewidth', 2); > fill ( Distance2, Depth2, [0.7 0.7 0.7] ); > > I do not want to show plots deeper than the ocean floor, so I am using 'fill' to cover it up. My question is why the 'fill' function can cover anything from the 'contourf' plot, but not the line plotted from 'contour'? > > Thank you.
|
Pages: 1 Prev: Ports and Data Manager Next: mapping toolbox - pointz shapefile |