Hi,
I am trying to create a combined graph of (separate) min, max and midnight temperature and precipitation with series for 1940 and 2022 in York (i.e. just 4 individual graphs).
I have used the following code:
My problem is that Stata gives me an error:
I'm wondering what is the problem given that Stata generates each graph individually.
Grateful for any help.
I am trying to create a combined graph of (separate) min, max and midnight temperature and precipitation with series for 1940 and 2022 in York (i.e. just 4 individual graphs).
I have used the following code:
Code:
twoway (sc min_temp month_day if lad_name=="York" & year==1940, yaxis(1) msize(tiny) legend(label(1 "1940"))) || /// (sc min_temp month_day if lad_name=="York" & year==2022, yaxis(1) msize(tiny) legend(label(2 "2022"))), title("Min temp in York") name("min_temp", replace) twoway (sc max_temp month_day if lad_name=="York" & year==1940, yaxis(1) msize(tiny) legend(label(1 "1940"))) || /// (sc max_temp month_day if lad_name=="York" & year==2022, yaxis(1) msize(tiny) legend(label(2 "2022"))), title("Max temp in York") name("max_temp", replace) twoway (sc Temperature_Midnight month_day if lad_name=="York" & year==1940, yaxis(1) msize(tiny) legend(label(1 "1940"))) || /// (sc Temperature_Midnight month_day if lad_name=="York" & year==2022, yaxis(1) msize(tiny) legend(label(2 "2022"))), title("Midnight temp in York") name("midnight", replace) twoway (sc total_precip month_day if lad_name=="York" & year==1940, yaxis(1) msize(tiny) legend(label(1 "1940"))) || /// (sc total_precip month_day if lad_name=="York" & year==2022, yaxis(1) msize(tiny) legend(label(2 "2022"))), title("Precipitation in York") name("precip", replace) graph combine min_temp max_temp midnight precip, name(all, replace)
Code:
series 3 not found
Grateful for any help.
Comment