stackedbar with negatives

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

RNYMOEN
Posts: 6
Joined: Thu Aug 20, 2015 5:38 am

stackedbar with negatives

Postby RNYMOEN » Wed Sep 30, 2015 11:50 pm

From a group with 7 time series variabels (called "bidrag") I get a nice graph with bars for the 6 first variables, and a line for the 7th using:

bidrag.mixed bar(1,2,3,4,5,6) line(7)

However, typically, some of the 6 components in "bar" are negative in a given time period, meaning that

bidrag.mixed stackedbar(1,2,3,4,5,6) line(7)

does not make sense, since the stacking does not sort between positive and negative values. What I am fishing for here is graph where (in each time period) "positives" are stacked in a bar above the zero line, and negatives are stacked in a bar below!

Have I overlooked an option, perhaps?

EViews Jason
EViews Developer
Posts: 870
Joined: Tue Sep 16, 2008 3:50 pm

Re: stackedbar with negatives

Postby EViews Jason » Thu Oct 01, 2015 12:13 pm

You will have to create a graph object first and then use the stackposneg option

Code: Select all

group mygroup x1 x2 x3 freeze(graph01) mygroup.mixed stackedbar(1,2) line(3) graph01.options stackposneg


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests