Dear all,
I need your support with an issue faced with the two-way area command. When I am plotting a triangle with a shaded area, I am getting a small support line for each element that runs to the baseline axis (see below). This issue does not appear if I am using a line plot. Hence, I assume that is had to do something with the area command.
Thank you for your thoughts on this issue.
Best regards,
Sandro
Please find below the output as pdf (focus on the lower left corner of each triangle).
Array
Please see below the minimal example:
clear all
set obs 11
g id = 2 if _n>=6 & _n<=11
replace id = 1 if _n>=2 & _n<=5
g _x = .
g _y = .
replace _x = 25 in 2
replace _y = 25 in 2
replace _x = 50 in 3
replace _y = 75 in 3
replace _x = 75 in 4
replace _y = 25 in 4
replace _x = 25 in 5
replace _y = 25 in 5
replace _x = 45 in 7
replace _y = 45 in 7
replace _x = 50 in 8
replace _y = 55 in 8
replace _x = 55 in 9
replace _y = 45 in 9
replace _x = 45 in 10
replace _y = 45 in 10
levelsof id, local(id_list)
foreach id in `id_list' {
local graph_shape (area _y _x if id==`id', ///
fcolor(red%20) lwidth(none) plotregion(color(none))) `graph_shape'
}
twoway `graph_shape' ///
, legend(off) graphregion(color(white)) plotregion(margin(0 0 0 0)) ylab(, nogrid)
graph export "graph_2.pdf", replace
graph export "graph_2.png", replace
Related Posts with Two-way area graph issue
Manually compute delta standard errorsDear Statalisters, I would like to manually compute the same delta standard errors as margins after …
Codes for Pre-and-Post firm yearsDear Stata Community, I am very new to econometrics. I wish to examine the impact of X variable on t…
Propensity Score Matching (PSM) to match firms in a specific yearDear Statalist, I have a panel dataset of firms going from 2008 to 2018. The dataset is made up of:…
Exporting two sample t test to word with Significance starsHi All, Is there any way of exporting a two sample t test to word with the correct significance sta…
GMM code error-messageDear Stata Users, I have been trying to run a GMM code but I don't know what's wrong with it becaus…
Subscribe to:
Post Comments (Atom)
0 Response to Two-way area graph issue
Post a Comment