Page 1 of 1

Program Legend text

Posted: Thu Aug 14, 2014 7:26 am
by mboldin
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)

Re: Program Legend text

Posted: Thu Aug 14, 2014 7:39 am
by EViews Gareth
The easiest way is to change the display name of the underlying series prior to creating the graph.

Re: Program Legend text

Posted: Thu Aug 14, 2014 8:55 am
by mboldin
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

Re: Program Legend text

Posted: Thu Aug 14, 2014 8:57 am
by EViews Gareth
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}