Page 1 of 1

Using svector elements in graph command

Posted: Fri Nov 14, 2014 7:35 am
by jgutman
I am trying to use the elements of svectors as arguments in a graph command
For example:

date_start and date_end are svectors, with elements like 30/11/1982 and 19/08/1986

however,
g1.draw(shade, bottom) date_start(1) date_end(1)
does nothing - the graph is unchanged
and, there is no error message
presumably eviews does not recognise these svector elements as the same type as would be usable as an argument to a graph?
thanks in advance for your help

Re: Using svector elements in graph command

Posted: Fri Nov 14, 2014 9:09 am
by EViews Gareth
Probably something like:

Code: Select all

%start = date_start(1) %end = date_end(1) g1.draw(shade, bottom) {%start} {%end}

Re: Using svector elements in graph command

Posted: Fri Nov 14, 2014 10:06 am
by jgutman
I tried similar, but I am told "% start is not a valid string or scalar name"

Re: Using svector elements in graph command

Posted: Fri Nov 14, 2014 10:08 am
by EViews Gareth
Did you use {}

Re: Using svector elements in graph command

Posted: Fri Nov 14, 2014 10:14 am
by jgutman
%start = date_start(2)
%end = date_end(2)
g2.draw(shade, bottom) {%start} {%end}

is what I used

Re: Using svector elements in graph command

Posted: Fri Nov 14, 2014 10:22 am
by EViews Gareth
Works for me:

Code: Select all

create m 1990 2000 series y=nrnd freeze(g2) y.line svector(2) date_start svector(2) date_end date_start = "1994m2" date_end = "1994m12" %start = date_start(2) %end = date_end(2) g2.draw(shade, bottom) {%start} {%end}

Re: Using svector elements in graph command

Posted: Tue Nov 18, 2014 4:36 am
by jgutman
embarrassingly, I had forgotten to freeze my graph :oops:
thanks for your help