Label obs in a scatter plot

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

JennyH
Posts: 11
Joined: Mon Mar 03, 2014 6:27 pm

Label obs in a scatter plot

Postby JennyH » Mon Mar 03, 2014 6:37 pm

Hi, I created a workfile with three series. The first one is country names and so it is an alpha series. The second and third are GDP and inflation for each country. Now I generate a scatter plot with GDP on the X axis and inflation on the Y. But my problem is that, when I tried to label each observation in the scatter plot with its country name, I clicked on Graph Opinions -> Axes and Scaling -> Obs/date axis, it shows that "Graph has no obs/date axis" in the Axis Assignment box. The Axis Labels where I am supposed to type in the alpha series is gray and does not allow me to do so. Could you please help me out? Thanks!

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

Re: Label obs in a scatter plot

Postby EViews Gareth » Mon Mar 03, 2014 9:49 pm

Enter the name of the alpha series in the box on the right that says "Optional alpha or series to use for observation labels".

JennyH
Posts: 11
Joined: Mon Mar 03, 2014 6:27 pm

Re: Label obs in a scatter plot

Postby JennyH » Tue Mar 04, 2014 1:06 pm

Yes, I tried that before I posted the question here. That box area is gray and does not allow to type in anything. It says: "Series labels cannot be used with this graph." The reason I guess, as said in the original post, is that "Graph has no obs/date axis." as shown in the Axis Assignment box. How can I fix it? Thanks a lot!
Enter the name of the alpha series in the box on the right that says "Optional alpha or series to use for observation labels".

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

Re: Label obs in a scatter plot

Postby EViews Gareth » Tue Mar 04, 2014 1:09 pm

Describe exactly what you've done.

JennyH
Posts: 11
Joined: Mon Mar 03, 2014 6:27 pm

Re: Label obs in a scatter plot

Postby JennyH » Tue Mar 04, 2014 2:13 pm

As said in the original post, I created a workfile for cross-sectional data. The data were imported to EViews and so there were three series in that workfile, Country (names), GDP, and Inflation. I opened GDP and Inflation as a group and the country names are shown on the left as identifier. But when I graph a scatter plot with GDP on the X axis and Inflation on the Y, I tried to label each observation with its country name. You said there is a place saying that "Optional alpha or series to use for observation labels". I saw that place is frozen in gray, showing "Series labels cannot be used with this graph."
Describe exactly what you've done.

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

Re: Label obs in a scatter plot

Postby EViews Gareth » Tue Mar 04, 2014 2:20 pm

If the workfile is already structured with country as the ID series, then the scatter will automatically get those names as the obs label.

You can only provide an alternative set of labels if the workfile is not already structured by one.

JennyH
Posts: 11
Joined: Mon Mar 03, 2014 6:27 pm

Re: Label obs in a scatter plot

Postby JennyH » Tue Mar 04, 2014 2:28 pm

How do I know "if the workfile is already structured with country as the ID series"? I open the group of GDP and Inflation and see each country's name lined up (in blue) on the far left side of the window. Does this mean it is structured with country as the ID series? If so, that is where I am and I do not see the scatter automatically get the names on the obs label.
If the workfile is already structured with country as the ID series, then the scatter will automatically get those names as the obs label.

You can only provide an alternative set of labels if the workfile is not already structured by one.

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

Re: Label obs in a scatter plot

Postby EViews Gareth » Tue Mar 04, 2014 2:30 pm

Yes, if the country names show on the spreadsheet view, then it is structured that way. What obs labels do you see if not the country names?

JennyH
Posts: 11
Joined: Mon Mar 03, 2014 6:27 pm

Re: Label obs in a scatter plot

Postby JennyH » Tue Mar 04, 2014 3:49 pm

EViews says "Graph has no obs/date axis". I don't see any obs labels on the scatter.
Yes, if the country names show on the spreadsheet view, then it is structured that way. What obs labels do you see if not the country names?

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

Re: Label obs in a scatter plot

Postby EViews Gareth » Tue Mar 04, 2014 4:05 pm

Turn obs labeling on.
Graph Options->Graph Elements->Symbol/Obs Label.

JennyH
Posts: 11
Joined: Mon Mar 03, 2014 6:27 pm

Re: Label obs in a scatter plot

Postby JennyH » Tue Mar 04, 2014 4:40 pm

What I see on my EViews 8 is Graph Options -> Graph Elements and I do not find "Symbol/Obs Label".

What I found is that there are four modules under Graph Elements: Lines & Symbols, Fill Areas, Bar-Area-Pie, and Boxplots. Which one I should go with? I clicked on Lines & Symbols and did not find anywhere I could turn on obs labeling.

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

Re: Label obs in a scatter plot

Postby EViews Gareth » Tue Mar 04, 2014 5:34 pm

...
Attachments
2014-03-04_163329.png
2014-03-04_163329.png (23.82 KiB) Viewed 11674 times

JennyH
Posts: 11
Joined: Mon Mar 03, 2014 6:27 pm

Re: Label obs in a scatter plot

Postby JennyH » Tue Mar 04, 2014 5:48 pm

So, where can I turn on obs label on the page you showed? Just choose "Auto Choice" and/or "Symbol Only"? I did both and it made no difference. Still says "Graph has no obs/date axis" and no obs label shows up.

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

Re: Label obs in a scatter plot

Postby EViews Gareth » Tue Mar 04, 2014 6:22 pm

Post your workfike

JennyH
Posts: 11
Joined: Mon Mar 03, 2014 6:27 pm

Re: Label obs in a scatter plot

Postby JennyH » Sun Mar 09, 2014 4:58 pm

Below are the images of workfile, obs/date axis, and graph elements, respectively. Thanks!
EViews Workfile.jpg
EViews Workfile.jpg (145.48 KiB) Viewed 11643 times
EViews ObsDate axis.jpg
EViews ObsDate axis.jpg (176.01 KiB) Viewed 11643 times
EViews Graph Elements.jpg
EViews Graph Elements.jpg (173.85 KiB) Viewed 11643 times


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests