Re: CONTOURing one dimension data [message #79155] |
Tue, 07 February 2012 20:15  |
Russell[1]
Messages: 101 Registered: August 2011
|
Senior Member |
|
|
On Feb 7, 12:46 am, shambhu <shambhu.mc...@gmail.com> wrote:
> Hi,
>
> I have a structured data of one dimension (ex: data.field14). I want
> to contour it over a continents map. How to CONTOUR one dimension
> data.
>
> Please help me.
Contour is fundamentally a two-dimensional thing. You must mean
something else....
If you have a scatter plot x,y, then you can maybe use hist_2d.pro to
make a two-dimensional histogram, but it's hard to answer your
question.
Russell
|
|
|
Re: CONTOURing one dimension data [message #79160 is a reply to message #79155] |
Tue, 07 February 2012 12:44   |
Brian Wolven
Messages: 94 Registered: May 2011
|
Member |
|
|
On Tuesday, February 7, 2012 3:27:32 PM UTC-5, David Fanning wrote:
> ben.bighair writes:
>
>> ;
>> ; Dr. Fanning, please don't look. Thanks.
>> ;
>> device, decomposed = 0
>> tek_color
>> for i = 0, 99 do plots,i,x[i], psym = 6, col = ix[i] + 1
>
> Oh, for God's sake! Sigh...
>
You are apparently the Santa Claus of IDL.
"He knows when you code bad or good, so code good for goodness' sake..."
|
|
|
Re: CONTOURing one dimension data [message #79161 is a reply to message #79160] |
Tue, 07 February 2012 12:45   |
ben.bighair
Messages: 221 Registered: April 2007
|
Senior Member |
|
|
On Feb 7, 3:27 pm, David Fanning <n...@idlcoyote.com> wrote:
> ben.bighair writes:
>> ;
>> ; Dr. Fanning, please don't look. Thanks.
>> ;
>> device, decomposed = 0
>> tek_color
>> for i = 0, 99 do plots,i,x[i], psym = 6, col = ix[i] + 1
>
> Oh, for God's sake! Sigh...
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
I told you not to look!
|
|
|
Re: CONTOURing one dimension data [message #79162 is a reply to message #79160] |
Tue, 07 February 2012 12:27   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
ben.bighair writes:
> ;
> ; Dr. Fanning, please don't look. Thanks.
> ;
> device, decomposed = 0
> tek_color
> for i = 0, 99 do plots,i,x[i], psym = 6, col = ix[i] + 1
Oh, for God's sake! Sigh...
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: CONTOURing one dimension data [message #79163 is a reply to message #79162] |
Tue, 07 February 2012 12:11   |
ben.bighair
Messages: 221 Registered: April 2007
|
Senior Member |
|
|
On Feb 7, 12:46 am, shambhu <shambhu.mc...@gmail.com> wrote:
> Hi,
>
> I have a structured data of one dimension (ex: data.field14). I want
> to contour it over a continents map. How to CONTOUR one dimension
> data.
>
> Please help me.
Hi,
I'm not sure I understand completely, but since a contour identifies
groups of similar value in a set, then you could use VALUE_LOCATE to
group your data.
x = randomu(seed, 100)
plot,x
; use value_locate to assign x-values into the sets 0-0.25,
0.25-0.5, ... left side open, right side closed (I think)
ix = VALUE_LOCATE([0.0, 0.25, 0.5, 0.75], x)
;
; Dr. Fanning, please don't look. Thanks.
;
device, decomposed = 0
tek_color
for i = 0, 99 do plots,i,x[i], psym = 6, col = ix[i] + 1
Is that what you mean? I'm a little fuzzy about putting it on a map.
Without locational info, how would you know where to place it on the
map?
If you actually have Lon, Lat values associated with each of your
points, then you can use
cgContour, data, lon, lat, ...
and you are good to go! http://www.idlcoyote.com/idldoc/cg/cgcontour.html
Cheers,
Ben
|
|
|
Re: CONTOURing one dimension data [message #79252 is a reply to message #79155] |
Tue, 07 February 2012 22:10  |
shambhu
Messages: 41 Registered: December 2011
|
Member |
|
|
Thank you all,
First i used Map_set to draw continents. Now i want to put contour
data on that map, to analyse the things. Histogram is working fine.
When i use OPLOT on MAP_SET it plotting it taking lat properly but not
the lon. I am plotting it for Asia region air data, but showing on
Africa. So wanted to try with CONTOUR by plotting it over MAP_SET. Is
it possible..!?
Code snippet is as follows:
MAP_SET, /CYLINDRICAL, 0, 0, /GRID, /CONTINENTS, $
TITLE = 'WIND SPEED v/s WIND DATA'
OPLOT, DATA.FIELD14, DATA.FIELD15
Thank you
|
|
|