Re: POLAR_CONTOUR plot giving strange values for contour lines [message #66914] |
Thu, 18 June 2009 05:21 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Robin writes:
> I've now managed to plot the data as a 3D surface using the following
> command:
>
> SURFACE, POLAR_SURFACE(dns, zeniths, azimuths)
>
> This works fine, and gives me the sort of data I'm expecting. However,
> the POLAR_CONTOUR command still gives me nonsense values! I've noticed
> a bit in the IDL help for the POLAR_SURFACE function which says "Note
> that the ordering of the elements in the array Z is opposite that used
> by the POLAR_CONTOUR routine.", but what does this mean? Does it mean
> I need to reverse the array of my z values to use it with contour?
> That sounds a little strange...why would that be?
>
> Any help would be much appreciated,
I think everyone might be a little reluctant to stick
their toe into this water because there is a very good
chance it could become a quadmire. :-(
I think your basic problem is that the POLAR_CONTOUR command
really requires a gridded data set. They way you are passing
data to it, IDL is going to attempt the gridding for you.
Letting IDL make choices like this has a long history of things
not working out all that well.
I have two suggestions that I would try. First, I would see
if I could figure out a way to grid my data first that was
more statisfying and looked better when it was contoured.
Here is one way to give that a try:
http://www.dfanning.com/tips/grid_surface.html
You might also try GRIDDATA.
My second suggestion is to just give up on POLAR_CONTOUR.
I have made this kind of polar plot before with the Orthographic
map projection and a bit of data manipulation. I don't remember
anything at all about how I did it now, except that I was a lot happier
with the result than I was with what I got from POLAR_CONTOUR.
I'll see if I can find something.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: POLAR_CONTOUR plot giving strange values for contour lines [message #66915 is a reply to message #66914] |
Thu, 18 June 2009 01:37  |
robintw
Messages: 37 Registered: March 2009
|
Member |
|
|
I've got an update to this problem:
I've now managed to plot the data as a 3D surface using the following
command:
SURFACE, POLAR_SURFACE(dns, zeniths, azimuths)
This works fine, and gives me the sort of data I'm expecting. However,
the POLAR_CONTOUR command still gives me nonsense values! I've noticed
a bit in the IDL help for the POLAR_SURFACE function which says "Note
that the ordering of the elements in the array Z is opposite that used
by the POLAR_CONTOUR routine.", but what does this mean? Does it mean
I need to reverse the array of my z values to use it with contour?
That sounds a little strange...why would that be?
Any help would be much appreciated,
Robin
|
|
|