> How would I go about about switching the order, i.e.
> positions on the y (vertical) axis and the data on the x (horizontal) axis?



There are several ways you could do it. Probably the most clear would be to use the Rename module

       Rename("data","foo");
       Rename("positions","data");
       Rename("foo","data");

You may however run into a problem if someone complains that there aren't any positions anymore. In which case an alternative is to Extract("positions"), and Extract("data"), and pass the results into the Construct module, the first and fourth inputs. Pass the old "positions" to the fourth input (which will become "data") and pass the old "data" into the first input (which will become "positions").

Hope this doesn't sound too ridiculous.

Donna L. Gresh, Ph.D.
Optimization and Mathematical Software Group
IBM T.J. Watson Research Center
(914) 945-2472
http://www.research.ibm.com/people/g/donnagresh
[EMAIL PROTECTED]



Chris Sideroff <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]

12/09/2003 05:04 PM
Please respond to opendx-users

       
        To:        [email protected]
        cc:        
        Subject:        Re: [opendx-users] Extracting data on 1D line




Quoting Chris Pelkie <[EMAIL PROTECTED]>:

> Off the top of my head, I'd say:
> Construct a 2 point line in 'Construct' by feeding a list of 2 vectors
> (2-d or 3-d, but 3-d might be required for the next steps)

 I managed to do this in between my message and your reply ;-) so I must be on
the right track.  Thanks (this worked ok for me).

> line. From there you should be able to use Plot or Rubbersheet or
> something to make the classic line graph. Plot may require some
> restructuring, I don't use it often. I think it needs X positions and Y
>
> data while you will have X,Y,Z positions and D data.

 Yes, Plot needs x-y data. This is what I did: I fed the line I made with
"Construct" to "Map" and mapped my temperature data onto the line.  To extract
the correct values I used "Mark -> Compute -> Unmark" to extract the correct
positions from the line and data.
 My next question is regarding the Plot module.  I extracted the y-position
values and the corresponding temperatures from the mapping.  This is what I
wanted.  But "Plot" plots the positions on the x (horizontal) axis and the data
on the y (vertical) axis.  How would I go about about switching the order, i.e.
positions on the y (vertical) axis and the data on the x (horizontal) axis?

Thanks, Chris

Reply via email to