Dear all,
First of all it's a pleasure to write my first question here on Statalist. I've found it very useful and I've always tried to search in old discussions for my problems and always found a solution.
This time instead, I haven't found anything (nor here nor using help or search on Stata), so here I am. I'll try to be as clear as possible.
I have obtained, from previous steps in my analysis, a dataset of 94 observation with 336 variables, each row containing information over a different country.
I have three main variables of interest right now, which are ext_input_mean, ext_sales_mean and region_n.
While the first two are percentages and can go from 0 to 100, region_n is a str1 variable that goes from 1 to 6, with each value identifying a geographical region.
What I'm doing right now is plotting all the countries situated in region_n == "3" having the other two variables as the graph axis.
I also want to label those countries that in the graph are situated outside the first quad, plus some others of interest, and I haven't met any problems as of now.
The code used is the following:
while the output is:

As you can see the output is quite chaotic with all those labels so close to each other and of course I'm not satisfied with it, so here's my question:
Is it possible to only represent a horizontal slice of the graph, of course enlarged?
What I mean is, for example, to represent only the section going from 40 to 80 of the y axis (ext_input_mean). I've already tried working on the yscale and xscale options, like by modifying that part of code with xscale(range(0 60)) yscale(range(40 80)), but it doesn't really do what I want and instead it returns:

I hope that the problem I've presented you is not due to my lack of knowledge in the usage of Stata!
Thanks in advance!
First of all it's a pleasure to write my first question here on Statalist. I've found it very useful and I've always tried to search in old discussions for my problems and always found a solution.
This time instead, I haven't found anything (nor here nor using help or search on Stata), so here I am. I'll try to be as clear as possible.
I have obtained, from previous steps in my analysis, a dataset of 94 observation with 336 variables, each row containing information over a different country.
I have three main variables of interest right now, which are ext_input_mean, ext_sales_mean and region_n.
While the first two are percentages and can go from 0 to 100, region_n is a str1 variable that goes from 1 to 6, with each value identifying a geographical region.
What I'm doing right now is plotting all the countries situated in region_n == "3" having the other two variables as the graph axis.
I also want to label those countries that in the graph are situated outside the first quad, plus some others of interest, and I haven't met any problems as of now.
The code used is the following:
Code:
generate sel_country = country if country == "Kosovo" | country=="Armenia" | country=="Estonia" | country=="Sweden" | country=="Romania" | country=="Fyr Macedonia" | country=="Belarus" | country=="Albania" | country=="Montenegro" | country=="Slovenia" scatter ext_input_mean ext_sales_mean if region_n=="3", title("Inport/export values for countries grouped by region") subtitle("Europe and Central Asia") xline(50, lpattern(dash)) yline(50, lpattern(dash)) xscale(range(0 100)) yscale(range(0 100)) xtitle("Mean external sales percentage") ytitle("Mean external input percentage") mlabel(sel_country) mlabsize(small)
As you can see the output is quite chaotic with all those labels so close to each other and of course I'm not satisfied with it, so here's my question:
Is it possible to only represent a horizontal slice of the graph, of course enlarged?
What I mean is, for example, to represent only the section going from 40 to 80 of the y axis (ext_input_mean). I've already tried working on the yscale and xscale options, like by modifying that part of code with xscale(range(0 60)) yscale(range(40 80)), but it doesn't really do what I want and instead it returns:
I hope that the problem I've presented you is not due to my lack of knowledge in the usage of Stata!
Thanks in advance!
Comment