I need advice on code for graph titles. I'm making a series of pie charts describing types of events that occurred in 50 year intervals. The code below makes the graphs. I want each graphs' title to reflect the interval. The first interval is 1500 to 1549. The locals y and z contain the correct values as the loop iterates, but they do not appear in the title, which instead reads like " ... temp_y ... ". Any advice on how I could get the titles to display the number (e.g. 1500) rather than temp_y would be appreciated.
Thanks
Gary
forval x=1550(50)1950 {
gen temp_y = `x'-50
local y temp_y
gen temp_y1 = `x'-1
local z temp_y1
graph pie tpre`x'_* if decade==`x'-10, sort descending title("Event Types from `y' to `z'")
drop temp_*
}
Thanks
Gary
forval x=1550(50)1950 {
gen temp_y = `x'-50
local y temp_y
gen temp_y1 = `x'-1
local z temp_y1
graph pie tpre`x'_* if decade==`x'-10, sort descending title("Event Types from `y' to `z'")
drop temp_*
}
Comment