I am working on Covid from various counties and regions in a particular US State. In order to get trend lines for several counties on a single graph I have written code like the following:
I have omitted the remaining title lines etc.
While this works it is a bit tedious and I keep thinking there has to be a simpler way to do it. A by statement produces separate subgraphs. I thought there might be an over options so that one could get multiple lines on the same plot with a single graph spec but that doesn't seem to be the case. Is there any easier way to do this?
Code:
twoway (line cum_case_n day_ob if county == "Brown", sort) /// (line cum_case_n day_ob if county == "Racine", sort) /// (line cum_case_n day_ob if county == "Milwaukee", sort) /// (line cum_case_n day_ob if county == "Forest", sort) /// (line cum_case_n day_ob if county == "Polk", sort), ///
While this works it is a bit tedious and I keep thinking there has to be a simpler way to do it. A by statement produces separate subgraphs. I thought there might be an over options so that one could get multiple lines on the same plot with a single graph spec but that doesn't seem to be the case. Is there any easier way to do this?
Comment