comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: 2D Plot in IDL with shading?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: 2D Plot in IDL with shading? [message #71516 is a reply to message #71419] Mon, 21 June 2010 12:15 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Jun 21, 3:41 pm, Ally <ally.desh...@gmail.com> wrote:
> On Jun 21, 11:14 am, pp <pp.pente...@gmail.com> wrote:
>
>> On Jun 21, 12:09 pm, Ally <ally.desh...@gmail.com> wrote:
>
>>> Great, that's exactly what I needed! I'm working on creating it right
>>> now.  Out of curiosity, is there any way to make a graph like that in
>>> 2D to start with, without a z-axis and just response plotted in color
>>> vs azimuth and elevation?
>
>> That is what would be called an image, which can be made with
>
>> iimage,response,elevation,azimuth
>
> I keep trying but can't seem to get isurface to graph it.  I may be
> missing something basic but I've been reading through different
> examples and can't figure it out.  Here is what I have:
>
> rows = 5273670
> OPENR, lun1, 'ss_raw_06.dat', /GET_LUN
> data = DBLARR(2,rows)
> READF, lun1, data
> response= data(1,*)
>
> OPENR, lun2, 'az.dat', /GET_LUN
> data2=DBLARR(2, rows)
> READF, lun2, data2
> az_g= data2(1,*)
>
> OPENR, lun3, 'sun_el_and_az.dat', /GET_LUN
> data3=DBLARR(2,rows)
> READF, lun3, data3
> az_s=data3(1,*)
> elevation=data3(0,*)
>
> azimuth=(az_s)-(az_g)
>
> isurface, response, elevation, azimuth
>
> It runs fine and the iSurface tool opens, there's just nothing
> graphed.

Have you checked that the data look right? You can check the
dimensions with

help,response,elevation,azimuth

And maybe min()/max() may be useful to tell if the values seem to make
sense.

You are reading all 3 arrays as 1D. You indicated above that you have
one response for each elevation and azimuth, which indicates that
response should be reformed to 2D, with the proper dimensions:

response_2D=reform(response,nx,ny)

Where nx is the length of the fastest-varying dimension (leftmost),
and ny is the other dimension. For this to be consistent with the way
you called isurface, the fastest-varying dimension in the file where
you read response from would have to be elevation, and the other would
be the azimuth.

If you do not provide response as a 2D array, the itools will not know
the connectivity of your points, and thus will start the gridding
wizard, to interpolate them, guessing they were not on a regular grid,
which is not your case.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Error detected while calling MPFIT_FDJAC2
Next Topic: Selecting data from two separate arrays

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 04:27:06 PDT 2025

Total time taken to generate the page: 2.48750 seconds