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 can I find maximal value of one variable between datesArray From the screenshot how can I find max cr between admitdate and disdate Thank you …
How do you combine categorical and numerical variables?How can I combine variables? These variables all refer to use of prescription benzodiazepines: val…
Strate graphHi everyone, I would like to create a survival graph: a strate graph. I ask you if it is possible to…
PISATOOLS package - How can I conduct a linear regression with one interaction?Hello everyone, I try to analyze PISA 2018 data and, more specifically, I would like to conduct a s…
ttest over multiple subsamplesHi, I have three variables, x, y, and z. x and y are categorical variables, x takes 0 and 1, but y t…
Subscribe to:
Post Comments (Atom)
0 Response to Two-way area graph issue
Post a Comment