Program Legend text

For requesting general information about EViews, sharing your own tips and tricks, and information on EViews training or guides.

Moderators: EViews Gareth, EViews Moderator

mboldin
Posts: 10
Joined: Wed Sep 11, 2013 7:53 am

Program Legend text

Postby mboldin » Thu Aug 14, 2014 7:26 am

Can I change the legend text by programming means-- not through the GRAPH Options GUI

Ie something like

plot(legend= 'Unemplyement rate', 'Inflation rate') series1 series2

Just being able to use the series description, not the variable name, might be enough (assuming I can edit the description)

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

Re: Program Legend text

Postby EViews Gareth » Thu Aug 14, 2014 7:39 am

The easiest way is to change the display name of the underlying series prior to creating the graph.
Follow us on Twitter @IHSEViews

mboldin
Posts: 10
Joined: Wed Sep 11, 2013 7:53 am

Re: Program Legend text

Postby mboldin » Thu Aug 14, 2014 8:55 am

OK so I would do something like

series1.displayname "Text here"

What if I wanted to use the series description or the description from another series ?

Is there global option to display the description in the legend ?

And is something like this possible

series1.displayname "Ratio of" + series2a@description + " and " + series2b@description

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

Re: Program Legend text

Postby EViews Gareth » Thu Aug 14, 2014 8:57 am

You'd have to build up a string containing the exact text you wanted to use as the displayname, then apply that.

Code: Select all

%dispstring = "Ratio of" + series2a.@description + " and " + series2b.@description
series1.displayname {%dispstring}
Follow us on Twitter @IHSEViews


Return to “General Information and Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 5 guests