Adding specific lines to multiple graphs

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

maragloria
Posts: 101
Joined: Tue Jun 29, 2010 7:09 am

Adding specific lines to multiple graphs

Postby maragloria » Thu Jan 09, 2014 8:56 am

Hi There,

I would like to add specific lines to multiple graphs using the command DRAW (or something else you might suggest).

Here is the image of my graph :
beta_au.jpg
beta_au.jpg (44.46 KiB) Viewed 3066 times


Here is the code I'm using :

Code: Select all

beta1.displayname Beta for lag=3M
beta2.displayname Beta for lag=6M
beta3.displayname Beta for lag=9M"
beta4.displayname Beta for lag=12M
freeze(beta_au) temp.line(m)
beta_au.addtext(t,textcolor(blue),font("arial", 20,+b)) "AUSTRALIE"
scalar mbeta1 = @mean(beta1)
beta_au.draw(line, left) mbeta1
show beta_au


I got 2 questions :

1) How can I add specific lines to each graph in the figure ? For instance, the horizontal lines you can see in all graphs is the mean of "beta for lag 3". The command "beta_au.draw(line, left) mbeta1" is adding the mean of beta1 to all graphs whereas I would like to have each graph with its own mean.

2) How can I add a text to each horizontal line ? I added the "0.6" you see in the first graph manually.

Thanks for your help,

Mara

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13315
Joined: Tue Sep 16, 2008 5:38 pm

Re: Adding specific lines to multiple graphs

Postby EViews Gareth » Thu Jan 09, 2014 9:00 am

On my phone, so can't check exactly, but the general rule of thumb is that you add text, formatting, lines, etc... to the individual graphs before merging them into a multi graphs
Follow us on Twitter @IHSEViews

maragloria
Posts: 101
Joined: Tue Jun 29, 2010 7:09 am

Re: Adding specific lines to multiple graphs

Postby maragloria » Thu Jan 09, 2014 9:12 am

Got it! Thanks very much for your prompt reply.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 26 guests