Hello,
I want to put a legend for some graph elements only and leave the rest of the elements without a legend. how can I do it please ?
I tried this code:
goup group1 variable1 variable2
freeze(graph) group1.line
graph.setelem(1) legend ("forecast")
But this gives me the following error message:
invalid graph option in "do_graph.setelem(1) legend ("forecast")
what is wrong with this code and how can I leave the rest of the elements without legends?
Thank you for your responses.
how to set legends for some graph elements only
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: how to set legends for some graph elements only
You have a space between legend and ("forecast"). Your approach is correct though, you just have to nuke out the other legend entries:
Code: Select all
create u 100
series y=nrnd
series x=nrnd
series z=nrnd
group g x z y
freeze(gr) g.line
gr.setelem(1) legend("forecast")
gr.setelem(2) legend("")
gr.setelem(3) legend("")
show gr
Re: how to set legends for some graph elements only
Thank you :) !
Who is online
Users browsing this forum: No registered users and 2 guests
