Create Annotate data set CITIES from the MAPS.USCITY data
set. The unprojected LONG and LAT variable values are converted to
radians and substituted for the projected X and Y variable values. LONG and
LAT are converted by multiplying them by the arccosine of -1 and dividing
that amount by 180. The cities are each assigned a value for the NEWST variable,
sequentially beginning at 100.
data cities(drop=state rename=(newst=state));
set maps.uscity(keep=lat long city state);
length function style color $ 8
position $ 1 text $ 20;
retain function 'label' xsys ysys '2'
hsys '1' when 'b' newst 100;
if state=12 and city='Miami' or
state=25 and city='Boston' or
state=23 and city='Bangor';
newst+1; color='blue'; size=10; text='T';
position='5';
style='marker'; x=long*arcos(-1)/180;
y=lat*arcos(-1)/180; output;
newst+1; color='blue'; size=4;
text=' '||city;
position='6'; style='swissb'; output;
run;