Categorical graphs - bug in ordering of within categories

For notifying us of what you believe are bugs or errors in EViews.
Please ensure your copy of EViews is up-to-date before posting.

Moderators: EViews Gareth, EViews Moderator

mamo
Posts: 191
Joined: Wed Nov 07, 2012 9:11 am

Categorical graphs - bug in ordering of within categories

Postby mamo » Thu Jul 02, 2020 7:43 am

Dear EVEIWS team

It seems that the ordering of within-categories in categorical graphs is not properly reflected, neither when the graph is programed nor when the ordering of the graph is changed via the options menu - see example program below

Best, mamo

Code: Select all

wfcreate a 2010 2011
rndseed 42
series x=nrnd
series y=nrnd
series cat=nrnd>0
group gr x y
' The graph gra_catyear should present output as ordered by "cat" first, then "@year"
freeze(mode=overwrite,gra_catyear) gr.bar(elemcommon=1) across(@SERIES,cscale)  within(cat)  within(@year) 
' The graph gra_yearcar should present output as ordered by "@year" first, then "cat"
freeze(mode=overwrite,gra_yearcat) gr.bar(elemcommon=1) across(@SERIES,cscale)  within(@year)  within(cat) 
show gra_catyear
show gra_yearcat
' But both graphs present the same orderings, of "cat" first, then @year
' Manually changing the ordering in the options menu of the graph generated in the line below neither seems to work
gr.bar(elemcommon=1) across(@SERIES,cscale)  within(@year)  within(cat) 

mamo
Posts: 191
Joined: Wed Nov 07, 2012 9:11 am

Re: Categorical graphs - bug in ordering of within categories

Postby mamo » Thu Jul 02, 2020 8:12 am

As I have found, the bug in the ordering of categories seems to be related to the dated workfile covering only two periods.
The categorical ordering works as expected in the code below which defines a three-year-range of the annual workfile (2009-2010).

Best, mamo

Code: Select all

wfcreate a 2009 2011
rndseed 42
series x=nrnd
series y=nrnd
series cat=nrnd>0
group gr x y
' The graph gra_catyear should present output as ordered by "cat" first, then "@year"
freeze(mode=overwrite,gra_catyear) gr.bar(elemcommon=1) across(@SERIES,cscale)  within(cat)  within(@year) 
' The graph gra_yearcar should present output as ordered by "@year" first, then "cat"
freeze(mode=overwrite,gra_yearcat) gr.bar(elemcommon=1) across(@SERIES,cscale)  within(@year)  within(cat) 
show gra_catyear
show gra_yearcat
' But both graphs present the same orderings, of "cat" first, then @year
' Manually changing the ordering in the options menu of the graph generated in the line below neither seems to work
gr.bar(elemcommon=1) across(@SERIES,cscale)  within(@year)  within(cat) 


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 17 guests