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)