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
cure modelHi I am working on cure models. using stpm2. I have estimated the cure percentage and median surviva…
How to adjust linear mixed models for a factor variableDear everyone, I am using Stata 14 on Windows 10. I am using data from a longitudinal cohort study …
Help needed for merging datasetsHi, I am using Stata 16 and I am trying to merge datasets. Below is an example of my dataset: Cod…
Question on huge suppression effect in KHB mediationDear Stata Users, I am using the user-written command KHB to perform a mediation analysis with a mu…
Fixed Effect Regression - ModeratorHello, I have panel data for a set of companies for the years 2001-2019. I am running fixed effect …
Subscribe to:
Post Comments (Atom)
0 Response to Two-way area graph issue
Post a Comment