Page 1 of 1

Graph - which line on top

Posted: Thu Apr 23, 2015 9:38 am
by johansamuelsson
Hi

When plotting a graph with, for example, three lines then the last line is placed on top of the others. Is it possible to control the layers on the lines? For example in the code below I would like to have the first line (in this case "Base") on top, i.e. the blue one, but Eviews places "Scen2" on top. I could of course swap and draw "Base" as the last line but then the order of the legend would be "wrong".

Code: Select all

WfCreate a 2000 2015 Series Base Series Scen1 Series Scen2 Base.fill 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 Scen1.fill 1,2,3,4,5,6,7,8,9,10,12,14,15,16,17,17 Scen2.fill 1,2,3,4,5,6,7,8,9,10,10,11,11,12,13,14 Graph g.line base scen1 scen2 g.setelem(1) linecolor(Blue) g.setelem(2) linecolor(Red) g.setelem(3) linecolor(Green)
Regards Johan

Re: Graph - which line on top

Posted: Thu Apr 23, 2015 9:49 am
by EViews Gareth
Not currently. The order of the series in the group is what dictates the draw order.

Re: Graph - which line on top

Posted: Wed Dec 07, 2016 10:04 am
by MOG
I believe this would do the trick:

Code: Select all

WfCreate a 2000 2015 Series Base Series Scen1 Series Scen2 Base.fill 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 Scen1.fill 1,2,3,4,5,6,7,8,9,10,12,14,15,16,17,17 Scen2.fill 1,2,3,4,5,6,7,8,9,10,10,11,11,12,13,14 Graph g.line base scen1 scen2 scen1 base g.setelem(1) linecolor(Blue) g.setelem(2) linecolor(Red) g.setelem(3) linecolor(Green) g.setelem(4) linecolor(Red) g.setelem(5) linecolor(Blue) g.name(4) g.name(5)

Re: Graph - which line on top

Posted: Thu Dec 08, 2016 12:32 am
by johansamuelsson
Nice! Thanks MOG