Hello all,
I'm trying to obtain a legend for a scatterplot to make the graph neater.
Following this link - http://statadaily.com/2010/10/04/drawing-scatter-plots/, I attempted to obtain the legend, however, it does not work (I followed the code from the third graph).
Is it perhaps because I'm trying to plot three separate graphs on a "two-way" graph?
I'm trying to obtain a legend for a scatterplot to make the graph neater.
Following this link - http://statadaily.com/2010/10/04/drawing-scatter-plots/, I attempted to obtain the legend, however, it does not work (I followed the code from the third graph).
Is it perhaps because I'm trying to plot three separate graphs on a "two-way" graph?
Code:
tw (scatter agr_share_emp lnGDP_pc if (Year==1965 | Year==1970 | Year==1975 | Year ==1980 | Year==1985| Year==1990 | Year==1995 | Year==2000| Year==2005 | Year==2010) & Country=="ARG", mlabel(Year)) tw (scatter agr_share_emp lnGDP_pc if (Year==1965 | Year==1970 | Year==1975 | Year ==1980 | Year==1985| Year==1990 | Year==1995 | Year==2000| Year==2005 | Year==2010) & Country=="ZMB", mlabel(Year)) tw (scatter agr_share_emp lnGDP_pc if (Year==1965 | Year==1970 | Year==1975 | Year ==1980 | Year==1985| Year==1990 | Year==1995 | Year==2000| Year==2005 | Year==2010) & Country=="MYS", mlabel(Year)), legend(label(1 “Argentina”) label(2 “Zambia”) label(3 "Malaysia"))
Comment