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
Using svector elements in graph command
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Using svector elements in graph command
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
I tried similar, but I am told "% start is not a valid string or scalar name"
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Using svector elements in graph command
Did you use {}
Re: Using svector elements in graph command
%start = date_start(2)
%end = date_end(2)
g2.draw(shade, bottom) {%start} {%end}
is what I used
%end = date_end(2)
g2.draw(shade, bottom) {%start} {%end}
is what I used
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Using svector elements in graph command
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
embarrassingly, I had forgotten to freeze my graph
thanks for your help
thanks for your help
Who is online
Users browsing this forum: No registered users and 2 guests
