Hi there, I'm trying to create a line graph with multiple lines for each product by year and quarter. To display the year and quarter together, I simply concatenated the two variables and created a new year_qtr variable. However, as you can see in the attached graph, it looks awfully crowded. Is there a way to simply show the year once for the four quarters, as opposed to for each quarter? And I'd still like to show the quarterly data points, so simply using the year variable doesn't help with that. Any help would be greatly appreciated! Code as generated by SAS below, but truncated. %_eg_conditional_dropds(WORK.SORTTempTableSorted); SYMBOL1 INTERPOL=JOIN HEIGHT=10pt VALUE=NONE LINE=1 WIDTH=2 CV = _STYLE_ ; SYMBOL2 INTERPOL=JOIN HEIGHT=10pt VALUE=NONE LINE=1 WIDTH=2 CV = _STYLE_ ; SYMBOL3 INTERPOL=JOIN HEIGHT=10pt VALUE=NONE LINE=1 WIDTH=2 CV = _STYLE_ ; Legend1 FRAME ; Axis1 STYLE=1 WIDTH=1 MINOR=NONE label=('Number of Prescriptions'); Axis2 STYLE=1 WIDTH=1 MINOR=NONE label=('Year, Quarter'); TITLE; TITLE1 "Number of Prescriptions by Year/Quarter"; FOOTNOTE; FOOTNOTE1 "Source: XXX Data, 2005-2015"; PROC SQL; CREATE VIEW WORK.SORTTempTableSorted AS SELECT statecd, hcv_rc ,year_qtr, SUM(num_presc) AS num_presc_SUM FROM HCV.HCVX GROUP BY statecd,hcv_rc,year_qtr ORDER BY statecd,hcv_rc,year_qtr ; QUIT; Legend1 label=(color=black height=1 'HCV Drugs') cborder=black; PROC GPLOT DATA = WORK.SORTTempTableSorted; PLOT num_presc_SUM * year_qtr =hcv_rc / VAXIS=AXIS1 HAXIS=AXIS2 FRAME LEGEND=LEGEND1 ;BY statecd; RUN; QUIT; %_eg_conditional_dropds(WORK.SORTTempTableSorted); TITLE; FOOTNOTE; GOPTIONS RESET = SYMBOL;
... View more