Hello,
I keep getting the error not a twoway plot type. Was wondering if anyone had any suggestions.
levelsof county, local(cty)
levelsof disease, local(dis)
foreach c of local cty{
foreach d of local dis{
twoway (bar cases year if county=="`c'" & disease=="`d'", yaxis(2) ///
yscale(range(0,2500) axis(2)) ///
ytick(0(500)2500, axis(2)) ///
ylabel(0(500)2500, axis(2))) ///
(line rate1 year if county=="`c'" & disease=="`d'", sort yaxis(1) ///
yscale(range(0,35) axis(1)) ///
ytick(0(5)35, axis(1)) ///
ylabel(0(5)35, axis(1))) ///
(rcap lower_95__ci upper_95__ci year if county=="`c'" & disease=="`d'", yaxis(1) ///
yscale(range(0,35) axis(1)) ///
ytick(0(5)35, axis(1)) ///
ylabel(0(5)35, axis(1))), ///
scheme(sj) ///
legend(label(1 "Cases") label(2 "Rate") label(3 "95%CI") row(1)) ///
ytitle("Rate, per 100,000 population", axis(1)) ///
title("`d' in `c', 2001-2019") ///
note("Data source: kaggle.com/zayanmakar/infectious-diseases-county-year-and-sex")///
graph export "Output/top5.png", replace ///
putexcel set "Output/GraphFile.xlsx", modify ///
putexcel B`3' = image(Output/top5.png) ///
}
}
Related Posts with Is not a two-way plot type
Editing individual markers in graph dotHello list readers. I'm constructing a dot chart in Stata using the graph dot command. I'd like to …
Using asdoc to report margins in nested tablesI am able to export my probit estimation results to MS Word in a nested table using asdoc, however, …
Reshaping data with multiple observations per participantHi all! This is my first post here, and I am a complete Stata beginner, so please be patient. I have…
Reshaping data - variables to observationsI have a number of variables which I would like to convert into observations. The data is structured…
do loop in stataHi Friend, I have a dataset with 40 variables. I need to create a new variable which added a suffix…
Subscribe to:
Post Comments (Atom)
0 Response to Is not a two-way plot type
Post a Comment