Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

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: 413
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 <mulgor@gmail.com> wrote in message <4bd368b3-cf32-4fd6-a762-c4161ca68199@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 2012a--same 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 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.

HTH,
Bjeorn



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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.