BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sanjay1
Obsidian | Level 7

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

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

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
;

View solution in original post

3 REPLIES 3
ballardw
Super User

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
;
Darrell_sas
SAS Employee

Or are you talking about an Annotate number?

If you are talking about annotate, the "position" variable determines where that is written.

http://support.sas.com/documentation/cdl/en/graphref/63022/HTML/default/viewer.htm#annotate_position...

 

sanjay1
Obsidian | Level 7

Thank you Ballardw, thats working for me.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 2038 views
  • 0 likes
  • 3 in conversation