Hi,
I have a group of time series and I want to do a categorical bar chart where each category is defined by the series
group g1 x y z w
Manually, when I click on the group, select graph, bar and categorical chart the chart created comes as I want it. However, I am not sure about the command for plotting this and the help is not very clear.
If I use
g1.bar(contract=raw)
EViews shuts down (well, the option "raw" doesn't exist but it is the closest to the options in the graph menu).
Could you please help?
Thanks,
Javier
Categorical graphs
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Pamela
- EViews Developer
- Posts: 54
- Joined: Wed Sep 17, 2008 2:52 pm
Re: Categorical graphs
You can define a categorical graph using the "within" and "across" keywords. For instance,
g1.bar within(s1)
Note that if you do not define an across or within series in the dialog, it will produce a standard graph even though you have selected Categorical graph in the dropdown.
g1.bar within(s1)
Note that if you do not define an across or within series in the dialog, it will produce a standard graph even though you have selected Categorical graph in the dropdown.
Re: Categorical graphs
Thanks Pamela, g1.bar within() did work.
I have now 4 charts in one and they have as legend the series name, is there a way I can do two things (i) change the labels without changing the name of the series and (ii) change individual charts axis range?
Thanks,
Javier
I have now 4 charts in one and they have as legend the series name, is there a way I can do two things (i) change the labels without changing the name of the series and (ii) change individual charts axis range?
Thanks,
Javier
-
EViews Pamela
- EViews Developer
- Posts: 54
- Joined: Wed Sep 17, 2008 2:52 pm
Re: Categorical graphs
To change the legend text, use the "legend" option with the "setelem" command. For instance, to modify the second series:
graph01.setelem(2) legend("new_text")
You may use the "axis" command to set the data endpoints for all graphs simultaneously:
graph01.axis range(-2,2)
Pamela
graph01.setelem(2) legend("new_text")
You may use the "axis" command to set the data endpoints for all graphs simultaneously:
graph01.axis range(-2,2)
Pamela
Re: Categorical graphs
Unfortunately it doesn't seem to work for me.
None of the two options below work:
group g1 x y z w
g1.bar within()
g1.setelem(1) Series x '<------ this gives an error
group g1 x y z w
freeze(g1_chart) g1.bar within()
g1_chart.setelem(1) Series x '<------- this doesn't show anything
Other options for the 'freeze' chart work such as addtext or align.
Any clues why?
Thanks,
Javier
None of the two options below work:
group g1 x y z w
g1.bar within()
g1.setelem(1) Series x '<------ this gives an error
group g1 x y z w
freeze(g1_chart) g1.bar within()
g1_chart.setelem(1) Series x '<------- this doesn't show anything
Other options for the 'freeze' chart work such as addtext or align.
Any clues why?
Thanks,
Javier
Re: Categorical graphs
Correction: I meant .setelem(1) legend("Series x")
-
EViews Pamela
- EViews Developer
- Posts: 54
- Joined: Wed Sep 17, 2008 2:52 pm
Re: Categorical graphs
The setelem command should be used with a graph. So it is true that group01.setelem will not work; you will need to freeze the graph first and use graph01.setelem.
graph01.setelem(1) legend("legendtext") should change the legend text.
Also, let me emphasize that if you do not specify an across or within series, you are not really getting a categorical graph.
graph01.setelem(1) legend("legendtext") should change the legend text.
Also, let me emphasize that if you do not specify an across or within series, you are not really getting a categorical graph.
Who is online
Users browsing this forum: No registered users and 2 guests
