More graph programming questions
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
More graph programming questions
How do I program so that the series in a line graph are renamed?
For instance, if I have F_VA, G_VA and I want these to show up in ledgend as "France Value Added" and "Germany Value Added"
How would I program a graph with 2 axes, where one of the axes is inverted?
say for instance, I have F_CAPEX and EU_UNCERTAINTY, France Capex and the EU uncertainty index. I want the EU uncertainty index to show up on an axes that is inverted.
Many thanks
For instance, if I have F_VA, G_VA and I want these to show up in ledgend as "France Value Added" and "Germany Value Added"
How would I program a graph with 2 axes, where one of the axes is inverted?
say for instance, I have F_CAPEX and EU_UNCERTAINTY, France Capex and the EU uncertainty index. I want the EU uncertainty index to show up on an axes that is inverted.
Many thanks
-
EViews Jason
- EViews Developer
- Posts: 870
- Joined: Tue Sep 16, 2008 3:50 pm
Re: More graph programming questions
Use:
To answer the second part, you will have to put the second series on the right axis and then invert it
Code: Select all
mygraph.name(1) France Value Added
mygraph.name(2) Germany Value AddedCode: Select all
mygraph.setelem(2) axis(r)
mygraph.axis(right) invert
Re: More graph programming questions
Thanks so much Jason!
How would I program it to give the graph a name say "Value-Added Investment" ?
Finally if I have number of countries for the series how would I do this as a loop
Other then
show VA_France.Line
show VA_Germany.LIne
show VA_Spain.Line
show VA_Greece.Line
and then the freeze command with each of them.
etc
How would I program it to give the graph a name say "Value-Added Investment" ?
Finally if I have number of countries for the series how would I do this as a loop
Other then
show VA_France.Line
show VA_Germany.LIne
show VA_Spain.Line
show VA_Greece.Line
and then the freeze command with each of them.
etc
-
EViews Jason
- EViews Developer
- Posts: 870
- Joined: Tue Sep 16, 2008 3:50 pm
Re: More graph programming questions
How would I program it to give the graph a name say "Value-Added Investment" ?
Code: Select all
mygraph.text(t) Value-Added InvestmentFinally if I have number of countries for the series how would I do this as a loop
Other then
show VA_France.Line
show VA_Germany.LIne
show VA_Spain.Line
show VA_Greece.Line
and then the freeze command with each of them.
etc
Code: Select all
for %s VA_France VA_Germany
freeze({%s}_graph) {%s}.line
next
Re: More graph programming questions
Sorry I meant to ask how you would loop the renaming of a series in a graph. So I have VA_graph.line.
How would I loop it so that I can rename all the series in the graph?
VA_graph.name(1) France
VA_graph.name(2) Germany
VA_graph.name(3) Italy
VA_graph.name(4) Spain
VA_graph.name(5) Euro Area
VA_graph.name(6) UK
I would also like to add % to the y axis title. How do I program so that axes are labeled.
Thanks
How would I loop it so that I can rename all the series in the graph?
VA_graph.name(1) France
VA_graph.name(2) Germany
VA_graph.name(3) Italy
VA_graph.name(4) Spain
VA_graph.name(5) Euro Area
VA_graph.name(6) UK
I would also like to add % to the y axis title. How do I program so that axes are labeled.
Thanks
Re: More graph programming questions
With regards to above.
mygraph.setelem(2) axis(r)
mygraph.axis(right) invert
What if I wanted the right inverted axis to start at a certain value?
mygraph.setelem(2) axis(r)
mygraph.axis(right) invert
What if I wanted the right inverted axis to start at a certain value?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: More graph programming questions
All of these commands are listed in the graph section of the Object Reference pdf
Re: More graph programming questions
where is this pdf or can you send a copy?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: More graph programming questions
Help menu
Re: More graph programming questions
I don't see what I want to do in here...can you direct me to page(s)
I can't get setobslabel command to work or label y axis.
I can't get setobslabel command to work or label y axis.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: More graph programming questions
How would I loop it so that I can rename all the series in the graph?
VA_graph.name(1) France
VA_graph.name(2) Germany
VA_graph.name(3) Italy
VA_graph.name(4) Spain
VA_graph.name(5) Euro Area
VA_graph.name(6) UK
Thanks
Code: Select all
%names = "France Germany Italy Spain ""Euro Area"" UK"
for !i=1 to 6
va_graph.name(!i) @word(%names, !i)
next
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: More graph programming questions
You want the
and
commands, I think.
Code: Select all
graph.axis range
Code: Select all
graph.axis format
Re: More graph programming questions
Hmm... the loop above doesn't seem to work for me.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: More graph programming questions
Code: Select all
%name = @word(%names, !i)
va_graph.name(!i) {%name}
Re: More graph programming questions
when I use this I just get for each series
@word("France Germany Italy Spain ""Euro Area"" UK", 1)
@word("France Germany Italy Spain ""Euro Area"" UK", 2)
@word("France Germany Italy Spain ""Euro Area"" UK", 3)
@word("France Germany Italy Spain ""Euro Area"" UK", 4)
@word("France Germany Italy Spain ""Euro Area"" UK", 5)
@word("France Germany Italy Spain ""Euro Area"" UK", 6)
@word("France Germany Italy Spain ""Euro Area"" UK", 1)
@word("France Germany Italy Spain ""Euro Area"" UK", 2)
@word("France Germany Italy Spain ""Euro Area"" UK", 3)
@word("France Germany Italy Spain ""Euro Area"" UK", 4)
@word("France Germany Italy Spain ""Euro Area"" UK", 5)
@word("France Germany Italy Spain ""Euro Area"" UK", 6)
Who is online
Users browsing this forum: No registered users and 2 guests
