defining array of characters

Matthias Fripp matthias.fripp at ECI.OX.AC.UK
Fri Oct 23 05:54:19 EDT 2009


You could also use something like this:

titles = 'north south east'
'draw title ' subwrd(titles, i)

That's what I came up with before I saw Jim Potemra's answer, but it's
probably less efficient.

Matthias

On Oct 22, 2009, at 7:30 PM, James T. Potemra wrote:

> Hi Ousmane:
>
> I think you can do something like this:
>
> title.1 = 'north'
> title.2 = 'south'
> title.3 = 'east'
> i = 1
> while ( i <= 3 )
> .
> .
> .
> 'draw title 'title.i
> i = i + 1
> endwhile
>
>
> Jim
>
> Ousmane Ndiaye wrote:
>> Hi,
>> I want to use loop to plot my graphics and I am wondering if there
>> is a away to pre-define an array of character in grads that I can
>> use for example in labeling the title of each graphic in a loop by
>> index reference aka :
>> title=['north','south','east']
>> then use title(i).
>> Ousmane
>>



More information about the gradsusr mailing list