Page 1 of 1

Shading

Posted: Thu Oct 05, 2023 7:39 am
by amrsherif
Hi,

I guess i have not used this shading code in a while, maybe since EViews 10 or 11, but i cannot seem to shade anymore in EViews 12 & 13.

I have a string with dates, named c1nber. And I am looping through the dates in the string to shade like so:

for %shadedate %shadedate2 {c1nber}
c1.draw(shade, bottom, rgb(237,236,231)) %shadedate %shadedate2
next

Example dates in c1nber are 1956M10 1956M11. however, I am getting a bad line/shade specification error.
Any idea as to why this works in older version of EViews but not the most recent ones, and what i can do to fix it?

Thank you!

Re: Shading

Posted: Thu Oct 05, 2023 8:01 am
by EViews Gareth
Seems to work ok for me in a test program:

Code: Select all

wfcreate m 1950 1960 string c1nber = "1956m10 1956m11" series y=@nrnd freeze(c1) y.line for %shadedate %shadedate2 {c1nber} c1.draw(shade, bottom, rgb(237,236,231)) %shadedate %shadedate2 next

Re: Shading

Posted: Thu Oct 05, 2023 12:05 pm
by amrsherif
Thanks, Gareth. I realized what the issue is. In case somebody else runs into this, my string included dates that were outside of the sampe of the graph. For exmaple, it included 1956, but my graph only started in 1975.

Not sure why this works in earlier versions of EViews but at least i got it to work on current versions.