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
How to create a plot showing the results of an OLS regressionDear all, I ran a panel regression taking the form of y = x1 +x12 + other control variable using …
Generating a variable for user pre and post policy changeHI, So I have panel data for 5 years (4,5,6,7,8) and I am evaluating a policy change that happened …
List of long string varsI am simply looking to get a list of all the different values of a string variable, but some of them…
Predicted values with a categorical x continuous interaction in a multilevel model with multiple imputationDear all, I am working with cross sectional survey data from 22 countries with 16965 observations. …
How to perform PSM without replacement using teffects psmach commandDear all, I want to perform 1:1 nearest neighbourhood PSM wihtout replacement, and get AI variance. …
Subscribe to:
Post Comments (Atom)
0 Response to Two-way area graph issue
Post a Comment