Stacked bar graph

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

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

tvonbrasch
Posts: 540
Joined: Fri Apr 15, 2011 5:35 am

Stacked bar graph

Postby tvonbrasch » Tue Oct 09, 2012 6:57 am

Hi

I have a problem when making a stacked bar graph. The series (see attached workfile) in the group include both negative and positive values.

If i make a stacked bar graph, the graph does not show the correct values. see graph01 and group .

However, if i first make a single bar graph with data contracted by e.g., mean, and then afterwards I create a stacked bar graph, I get the desired result (see graph02correct and group1).

Is this a bug?

Sincerely,
Thomas von Brasch
Eviews 7.2 October 3
Attachments
bargraph.WF1
(18.56 KiB) Downloaded 414 times

EViews Esther
EViews Developer
Posts: 149
Joined: Fri Sep 03, 2010 7:57 am

Re: Stacked bar graph

Postby EViews Esther » Tue Oct 09, 2012 11:32 am

This is not a bug. The way EViews creates a stacked bar graph (i.e. stacking positive & negative values) is different from Excel.

You will get the desired result by choosing the checkbox of the Stacked bar graphs (Graph Elements -> Bar-Area-Pie -> Checkbox: Stacked bar graphs ) option.
Attachments
eg.PNG
eg.PNG (43.62 KiB) Viewed 9641 times

tvonbrasch
Posts: 540
Joined: Fri Apr 15, 2011 5:35 am

Re: Stacked bar graph

Postby tvonbrasch » Tue Oct 09, 2012 11:30 pm

perfect, thanks,
Thomas

miorinnovo
Posts: 199
Joined: Sun Mar 01, 2015 5:01 pm

Re: Stacked bar graph

Postby miorinnovo » Fri May 13, 2022 6:25 am

EViews Esther wrote:This is not a bug. The way EViews creates a stacked bar graph (i.e. stacking positive & negative values) is different from Excel.

You will get the desired result by choosing the checkbox of the Stacked bar graphs (Graph Elements -> Bar-Area-Pie -> Checkbox: Stacked bar graphs ) option.



Is there a way to do this by coding it? I'm trying to do a mixed graph with a line and the rest stack bars but the 'stackedbar(2,3,4)' command seems to default to the non-excel way.

thanks

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13294
Joined: Tue Sep 16, 2008 5:38 pm

Re: Stacked bar graph

Postby EViews Gareth » Fri May 13, 2022 8:55 am

Code: Select all

mygraph.options stackposneg
Follow us on Twitter @IHSEViews

miorinnovo
Posts: 199
Joined: Sun Mar 01, 2015 5:01 pm

Re: Stacked bar graph

Postby miorinnovo » Fri May 13, 2022 5:48 pm

EViews Gareth wrote:

Code: Select all

mygraph.options stackposneg

Thanks, maybe i have the wrong first part though.

Doing this :

Code: Select all

 
mygraph.mixed stackedbar(1) line(2)
mygraph.options stackposneg


It gives me an error saying options is not a valid view


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 13 guests