shaded area doesn't appear in the graph
Posted: Tue May 10, 2016 7:02 am
Hi everyone,
I am using draw(shade, b) to separate history from forecast in a figure. I am using these piece of commands:
I attached a screenshot of graph I obtained after runing the code below, I named it "shade1"
More suprinsingly, I wanted to know the value of "a" just to be sure that it's computed correcly so I runned this code (which is the same as above except for the first, the third and the fourth line):
The hole graph have been shaded this time, while, in my understanding, this code should give us exactly the same result as above since I just declared "a" as a scalar instead of using it as a control variable.
I attached a screenshot of the graph I obtained this time, I named it "shade2"
Thank you in advance for your reponses.
I am using draw(shade, b) to separate history from forecast in a figure. I am using these piece of commands:
Code: Select all
range 2002m1 2018m12
%fsmpl="@first+!a @last"
smpl @all
!a=obs(my_variable)
delete(noerr) my_graph
smpl 2015m04 2018m12
freeze(my_graph) my_variable.line
my_graph.draw(shade,b,gray) {%fsmpl}
show my_graphMore suprinsingly, I wanted to know the value of "a" just to be sure that it's computed correcly so I runned this code (which is the same as above except for the first, the third and the fourth line):
Code: Select all
range 2002m1 2018m12
%fsmpl="@first+a @last"
smpl @all
scalar a
a=obs(my_variable)
delete(noerr) my_graph
smpl 2015m04 2018m12
freeze(my_graph) my_variable.line
my_graph.draw(shade,b,gray) {%fsmpl}
show my_graphI attached a screenshot of the graph I obtained this time, I named it "shade2"
Thank you in advance for your reponses.