a question about shading program.
Posted: Thu Apr 07, 2011 7:55 am
Hi all.
I wrote a subroutine that shade a graph according to a series. The program is as below.
My problem is, after shading, the graph was given a verticle black line(either at the very beginning or the end of a graph)when the graph begins or ends with a shade area.
Could anyone tell me where this line is from and how to solve it? Thank you very much in advance.
subroutine shade(series x, graph %graphname)
smpl @all
scalar obs=@obs(x)
scalar nas=@nas(x)
scalar total=obs + nas
for !i=2 to total
if x(!i)>x(!i-1) then
%shadedate=@otods(!i-1)
%shadedate2=@otods(!i)
graphname.draw(shade, bottom, rgb(215, 216, 203)) %shadedate %shadedate2
endif
next
endsub
I wrote a subroutine that shade a graph according to a series. The program is as below.
My problem is, after shading, the graph was given a verticle black line(either at the very beginning or the end of a graph)when the graph begins or ends with a shade area.
Could anyone tell me where this line is from and how to solve it? Thank you very much in advance.
subroutine shade(series x, graph %graphname)
smpl @all
scalar obs=@obs(x)
scalar nas=@nas(x)
scalar total=obs + nas
for !i=2 to total
if x(!i)>x(!i-1) then
%shadedate=@otods(!i-1)
%shadedate2=@otods(!i)
graphname.draw(shade, bottom, rgb(215, 216, 203)) %shadedate %shadedate2
endif
next
endsub