Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.



Re: polar contourf plot: how to avoid the edge effects?
Posted:
Jul 20, 2012 6:14 AM


TideMan <mulgor@gmail.com> wrote in message <4bd368b3cf324fd6a762c4161ca68199@googlegroups.com>... > 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 2012asame problem. Is the problem really not there in 2012b? > > > > Kris > > > > "Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <juatvf$7c8$1@newscl01ah.mathworks.com>... > > > "Kristoffer " <kwalker@ucsd.edu> wrote in message <juasrp$3kk$1@newscl01ah.mathworks.com>... > > > > > > > > > > > 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 overplotted 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').
Seems to work for this case for me.
HTH, Bjeorn



