TideMan <email@example.com> wrote in message <firstname.lastname@example.org>... > On Friday, July 20, 2012 7:13:13 PM UTC+12, Kristoffer wrote: > > I expect you aren't interpreting my "edge effect" correctly. Here is a pic showing the problem. There is a vertical line from the origin to "90 deg" label in the contourf plot. Ignore the angle labels, as they are meaningless. That "90 deg" label corresponds to the 0/2pi wrap boundary. I just shifted it to do north for plotting purposes. > > > > http://sail.ucsd.edu/~walker/contourf/out.jpg > > > > I was using version 2010b. I just tried it on 2011b. Same problem. I also just installed version 2012a--same problem. Is the problem really not there in 2012b? > > > > Kris > > > > "Bruno Luong" <email@example.com> wrote in message <firstname.lastname@example.org>... > > > "Kristoffer " <email@example.com> wrote in message <firstname.lastname@example.org>... > > > > > > > > > > > Running test shows the edge effect that I'm referring to. It is occurring where the angle vector wraps from 2pi back to 0. > > > > > > Run fine to me (v. 2012B). May be you run on a buggy older MATLAB version. > > > > > > Bruno > > You have come upon a problem that has stumped many of us for a decade or more. It happens all the time in cotidal charts, where the tide amplitude is plotted using contourf and the phase lines are over-plotted using contour. The problem is that there is a vertical cliff of phase lines between 2pi and zero. > > So far, in more than a decade using Matlab for this, I have not found a solution to the problem anywhere.
Maybe not the most elegant of solutions:
shading flat takes away the edges of the patches - then if you guys want it back you might do it with contour(....,'k').