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

Home » Public Forums » archive » Re: using LOCATIONS keyword of IDLgrText?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: using LOCATIONS keyword of IDLgrText? [message #52391] Sat, 03 February 2007 11:07
badjelly.witch is currently offline  badjelly.witch
Messages: 27
Registered: May 2006
Junior Member
On Feb 3, 5:20 am, Laurens <mr....@inter.nl.net> wrote:
> I found a way to make it work, though I don't know if its
> efficient or nice to do;
>
> had to give a reform command to the positions keyword:
>
> , POSITIONS=reform(posArr,3,i)
>
> I'm open to suggestions for nicer solutions though this works
> fine for me...

That looks nice enough to me, but if to avoid flattening the array
when you extend it you can add a couple more brackets:

posArray = [[posArray],[newPos]]

By the way, extending an array repeatedly like this gets *very*
inefficient when the array is large, because you're actually creating
a whole new array every time. But for your application this shouldn't
be a problem.
Re: using LOCATIONS keyword of IDLgrText? [message #52398 is a reply to message #52391] Fri, 02 February 2007 08:20 Go to previous message
Laurens is currently offline  Laurens
Messages: 41
Registered: May 2006
Member
I found a way to make it work, though I don't know if its efficient or
nice to do;

had to give a reform command to the positions keyword:

, POSITIONS=reform(posArr,3,i)

I'm open to suggestions for nices solutions though this works fine for me...

Laurens

Laurens wrote:
> Hi, once again,
>
> I'm starting to feel sorry for myself for not being able to find what I
> want to know; I kinda kn�w that the solution should be somewhere in the
> groups and somehow I think it could be constructed by all the
> J.D.-Smith-bracket-fun on David's site, but I can't make anything out of
> it (call me stupid lol).
>
> Problem: I'm having an IDLgrText-object. I need multiple texts displayed
> on a curve, so I already have an array of strings for that (keyword
> STRINGS). I'm also creating an array for the positions for each string:
>
> newPos = [x,y,z]
> IF (n_elements(posArray) EQ 0) THEN $
> posArray = [newPos] $
> ELSE $
> posArray = [posArray,[newPos]]
>
> IDLgrText->SetProperty, POSITIONS=posArray
>
> Somehow though, that doesn't work; the first text is displayed correctly
> but the next ones go to 0,0,0 which tells me that IDL doesn't like the
> positions somehow.
>
> Is my expansion of the Array faulty or does the POSITIONS keyword just
> not work :-) (one can always hope its not his own fault, right :P)
>
> I'm thankful once again :-)
>
>
> Cheers, Laurens
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDLDBDatabase and DIALOG_DBConnect()
Next Topic: non linear systems, mpfitexpr and functargs

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

Current Time: Fri Oct 10 05:46:51 PDT 2025

Total time taken to generate the page: 0.56204 seconds