The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: polar contourf plot: how to avoid the edge effects?
Replies: 7   Last Post: Jul 20, 2012 3:10 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Bjorn Gustavsson

Posts: 430
Registered: 12/7/04
Re: polar contourf plot: how to avoid the edge effects?
Posted: Jul 20, 2012 6:14 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

TideMan <> wrote in message <>...
> 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.
> >
> >
> >
> > 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" <b.luong@fogale.findmycountry> wrote in message <juatvf$7c8$>...

> > > "Kristoffer " <> wrote in message <juasrp$3kk$>...
> > >

> > > >
> > > > 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').

Seems to work for this case for me.


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.