Hello,
This is my first post here so if I did something wrong I apologize.
I'm working with a dataset from Comtrade, specifically with information about trade values between Italy, Belgium, Mexico, Israel, Japan and USA. I was trying to make the same graph (Graph 1) and I almost get it. The problem is that I don't know how to put together both x axis and y axis (from the origin) in order to have no space after the beginning.
I run the following code:
twoway scatter porcentaje_com porcentaje_pib, title(" ", margin(b=1)) mlabel(reporter) mlabcolor(black) mlabv(pos) graphregion(fcolor(white)) ytitle("Porcentaje del comercio" " estadounidense con la UE", orientation(horizontal) margin(0 -35 80 0) size(small)) ylab(, ang(hor) labsize(small)) xtitle("Porcentaje del PIB de la UE", margin(0 -45 0 0) size(small)) xlab(, labsize(small)) legend(off) mcolor(ebblue) msize(small) || function y=x, range(0 25) n(2) aspect(1) lcolor(black)
And I got the Graph 2
I hope you understand my question.
Thanks!
PD: the idea is basically to force the line to touch both margins.
Related Posts with Twoway scatter plot: how to modify axis length
Stata CodeHey Stata Community, I'm looking for a way to generate a variable depending on the "4 last letters…
testing marginal effects after bivariate probit modelDear all, I estimate 3 bivariate probit models (for three countries), using biprobit command with r…
Reghdfe and margins?Hi, I am using reghdfe (nov19 versions) and need to estimate margins after that (I know there used …
Create parent child links in panel dataHi everyone, I am working with a panel data set and want to create intergenerational linkages betwe…
How to select 1:2 matched sample without using "joinby"? Dear Statalists, Part of my data is as follows. Code: * Example generated by -dataex-. For more in…
Subscribe to:
Post Comments (Atom)
0 Response to Twoway scatter plot: how to modify axis length
Post a Comment