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
How to perform NLS estimation with a complex functionDear Stata users, I need to use NLS to estimate the following equation describing the so-called Ba…
Looping to create a difference scoreHello all, I am working on a project where I need difference scores. I will have a number of differ…
Endogeneity & dropping of constraintsHi, I am doing Durbin–Wu–Hausman test to test my independent variables for endogeniety. My data is…
Subsample dataset under multiple conditionsWindows 10 Stata 16 Code: * Example generated by -dataex-. To install: ssc install dataex clear in…
Hausman test/Estimating pmg,mg, dfe Good afternoon I am estimating a dynamic model with pmg, mg and dfe. the study has to do with the …
Subscribe to:
Post Comments (Atom)
0 Response to Twoway scatter plot: how to modify axis length
Post a Comment