Label Graph Axis
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
rmoralesaramburu
- Posts: 52
- Joined: Mon Nov 18, 2013 9:09 am
Label Graph Axis
Hello,
I need to label the bottom axis of my graph with dates. The dates I want are on an excel file, and are on a row and several columns. How can I program eviews to import does dates and label it on the bottom axis of my graph.
thanks!!
I need to label the bottom axis of my graph with dates. The dates I want are on an excel file, and are on a row and several columns. How can I program eviews to import does dates and label it on the bottom axis of my graph.
thanks!!
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Label Graph Axis
What is the graph of? How was it created?
Is there any special reason that the workfile containing the graph doesn't already have dates?
Is there any special reason that the workfile containing the graph doesn't already have dates?
-
rmoralesaramburu
- Posts: 52
- Joined: Mon Nov 18, 2013 9:09 am
Re: Label Graph Axis
the graph is a line graph of a series
The workfile contains series, doesn't contain dates. I am importing data from excel with wfopen function
and the thing is that my series are in columns, column A is series1, column B is series2, .... and so on. but my dates are on a row, so Column A will have a date columnA on row1, column B a date con column B row1, and so on..
Code: Select all
graph ois.line xseriesCode: Select all
wfopen(page=ois) "H:\10. Varios\Rodrigo Morales\Analisis\Program Inputs\FI\OIS_US.xlsx" range=sheet1!b8-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Label Graph Axis
Could you provide the Excel file?
-
rmoralesaramburu
- Posts: 52
- Joined: Mon Nov 18, 2013 9:09 am
Re: Label Graph Axis
Here it is, in row 2 are the dates I need to use.
- Attachments
-
- OIS_US.xlsx
- so in row 2 I have the dates I will like
- (102.47 KiB) Downloaded 580 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Label Graph Axis
Problem is that you only have 47 dates (B2:AV2), yet you have 50 observations in the workfile (and thus, I presume, the graph). Where are the missing 3 dates?
-
rmoralesaramburu
- Posts: 52
- Joined: Mon Nov 18, 2013 9:09 am
Re: Label Graph Axis
The thing is I created a new series with 47 observation on Eviews (I extract an observation per column), and I would like to graph them, with the dates on row 2, so I have 47 dates, and 47 observations.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Label Graph Axis
ok, could you provide the workfile with the graph (or the program that makes the graph)?
-
rmoralesaramburu
- Posts: 52
- Joined: Mon Nov 18, 2013 9:09 am
-
rmoralesaramburu
- Posts: 52
- Joined: Mon Nov 18, 2013 9:09 am
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Label Graph Axis
I'd do something like this:
Code: Select all
wfopen(page=ois) "OIS_US.xlsx" range=sheet1!b8
matrix(47,1) months_to_hike
for !i = 1 to 47
smpl if fwd2013_!i<=0.5
matrix months_to_hike(!i,1)=@obs( fwd2013_!i)
next
pageload(page=dates) "ois_us.xlsx" byrow range=sheet1!b2:av2
alpha dates = @datestr(@date, "DD-MM-YY")
copy ois\months_to_hike dates\
mtos(months_to_hike)
rename ser01 monthshike
graph months.line monthshike
months.addtext(t,font("arial",12,b)) "Months to FED Hike"
save "H:\10. Varios\Rodrigo Morales\Analisis\EVIEWS\OIS_MonthHike.wf1"
-
rmoralesaramburu
- Posts: 52
- Joined: Mon Nov 18, 2013 9:09 am
Re: Label Graph Axis
thanks! just a question, what are you telling the program to do with
Code: Select all
alpha dates = @datestr(@date, "DD-MM-YY")-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Label Graph Axis
Oh, that line is not needed, I forgot to remove it.
-
rmoralesaramburu
- Posts: 52
- Joined: Mon Nov 18, 2013 9:09 am
Re: Label Graph Axis
Do you know how to label the last observation in a line graph? I would like to label just the LAST observation.
Thanks!
Thanks!
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Label Graph Axis
Code: Select all
wfopen(page=ois) "OIS_US.xlsx" range=sheet1!b8
matrix(47,1) months_to_hike
for !i = 1 to 47
smpl if fwd2013_!i<=0.5
matrix months_to_hike(!i,1)=@obs( fwd2013_!i)
next
pageload(page=dates) "ois_us.xlsx" byrow range=sheet1!b2:av2
smpl @last @last
alpha dates = @datestr(@date, "DD-MM-YY")
smpl @all
copy ois\months_to_hike dates\
mtos(months_to_hike)
rename ser01 monthshike
graph months.line monthshike
months.addtext(t,font("arial",12,b)) "Months to FED Hike"
months.setobslabel(series) dates
Who is online
Users browsing this forum: No registered users and 2 guests
