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

Home » Public Forums » archive » 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 #71514 is a reply to message #71450] Mon, 21 June 2010 12:59 Go to previous message
Ally is currently offline  Ally
Messages: 13
Registered: June 2010
Junior Member
On Jun 21, 3:15 pm, pp <pp.pente...@gmail.com> wrote:
> 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.

I'm sorry, now I'm even more confused. I have my 3 data sets, which
are all arrays with one column and 5273670 rows. I'm trying to plot
them in this 3D graph as (x,y,z) points. I understand why you're
saying that I need to reform the response (hadn't thought about the
connectivity before) but don't understand the fastest-varying
dimension concept. I tried reform(response, 2, 5273670) and
reform(response, 5273670, 2) and got an error that said 'new
subscripts must not change the number elements in response' each
time. What dimension am I trying to add to reform exactly?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: USERSYM custom symbol help
Next Topic: Multiplanar Viewer (MPV) in IDL

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

Current Time: Fri Oct 10 09:18:36 PDT 2025

Total time taken to generate the page: 0.48300 seconds