Hi SAS Communities,
Is there is anyway to place the display of numbers right side or the left side of the map. (age 20-20 26-26 28-32 below the map, is there is anyway to palce it right side or left side of the map )
Below is my code
data response_data;
input idname$ X Y age;
cards;
Cuba -20722.00205 4678.3461646 20 24
Guatemala -21079.71903 4444.6666525 26
Haiti -20480.41176 4569.4493199 28
Honduras -20942.88097 4419.9807239 32
;
run;
proc template;
define style styles.colorramp;
parent=styles.pearl;
style twocolorramp / startcolor=cxF3F7FE endcolor=cx6497EB;
end;
run;
data anno;
length function style color $ 10 position $ 1 text $5;
retain flag 0 function 'label' xsys ysys '2' hsys '3' when 'a' ;
set response_data ;
color= 'black';
text=put(age,comma5.);
position = '5' ;
size = 2.5;
style = "Cumberland AMT";
output;
run;
proc gmap data=response_data map=mapsgfk.world;
id IDNAME;
choro age/annotate=anno coutline=grayaa xsize = 2 in ysize = 2 in;
run;
quit;
Thanks & Regards,
Sanjay
The LEGEND statement controls the location and appearance of your map values.
You can have multiple legends assigned so you will also need to specify the desired definition you want in the gmap code.
Something like
Legend1 position=(top left outside) /* puts the location to the top left of the map on the outside*/
across = 1 /* how many columns of values, 1 means a single column and will appear vertically*/
;
Then in your CHORO statement add the option Legend=Legend1
such as:
choro age/ annotate=anno
coutline=grayaa
xsize = 2 in
ysize = 2 in
legend=legend1
;
The LEGEND statement controls the location and appearance of your map values.
You can have multiple legends assigned so you will also need to specify the desired definition you want in the gmap code.
Something like
Legend1 position=(top left outside) /* puts the location to the top left of the map on the outside*/
across = 1 /* how many columns of values, 1 means a single column and will appear vertically*/
;
Then in your CHORO statement add the option Legend=Legend1
such as:
choro age/ annotate=anno
coutline=grayaa
xsize = 2 in
ysize = 2 in
legend=legend1
;
Or are you talking about an Annotate number?
If you are talking about annotate, the "position" variable determines where that is written.
Thank you Ballardw, thats working for me.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.