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
Reshape with two types of ID variablesHi all, Is there a way to reshape by individual ID with another ID (household ID) as a variable, as …
Moving Average in Time SeriesHi All, I want to calculate the backward 12-month moving average of bse_monthly_market_volatility. …
how to create a cross-tabulations, dummy variables and regression with wide dataCan someone help me with a syntax to use; on how to run cross tabulations, create dummy variables an…
opening v11 do files on same PC with new v17I checked forums and Google. Could not find the right answer. In short, I had Stata 11 on wife's PC …
Bar graph with multiple variables overlayingHello, I am wondering if it is possible to create a figure like this using stata. I have two variab…
Subscribe to:
Post Comments (Atom)
0 Response to Twoway scatter plot: how to modify axis length
Post a Comment