SAS version: 9.04.01M1P120413 Problem: datalabels on scatter plot colliding. Is there a way to move the labels, while keeping the dimensions of the graph as is? For instance, can I make it so one label is above the point and the other label is below the point? Or better yet, is there a way to click into the graph and manually move the labels? Parameters: 1. cannot rely on legend to identify points. Points must be identified on the graph itself 2. cannot change dimensions. it has to stay 5 by 3. Example data set and plot code: data fake; input ID served SRVs UL LL; if ID=1000087 then do; label="really long name that was replaced because confidential"; end; else if ID=1004937 then do; label="another really long name replaced because confidential"; end; datalines; 1 6 0 . . 3 6 0 . . 4 6 0 . . 5 6 0 . . 1000027 12 0 . . 1000129 11 0 . . 1000132 8 0 . . 1000132 10 0 . . 1000335 8 0 . . 1005796 7 0 . . 1005855 12 0 . . 2 4 1 . . 1000022 9 1 . . 1005725 13 1 . . 50 5 2 . . 67 6 2 . . 1000087 7 4 . . 1004937 4 4 . . 0 0 . 2.95692 0 0 2 . 2.97338 0 0 4 . 2.99016 0 0 6 . 3.00729 0 0 8 . 3.02478 0 0 10 . 3.04265 0 0 12 . 3.0609 0 0 14 . 3.07957 0 ; ods graphics on /height=5in width=3in border=off; proc sgplot data=fake; title "Trends in SRVs for small providers"; band x=served upper=UL lower=LL / LEGENDLABEL= "typical range"; scatter x=served y=SRVs / datalabel=Label LEGENDLABEL= "# SRVs for provider"; yaxis min=0 max=5 label='Number of SRVs' grid; xaxis min=3 max=14 label='Number of consumers served' grid; run; quit;
... View more