Hi,
I'm using the proc gmap to display some information connected to certain regions. To do this I used an annotation dataset point to the different regions. There are however parts of the annotation data set that have coordinates outside the actual display map. Is there anyway to increase the whitespace, zoom out or pan the map to include the whole anno dataset?
Thanks!
goptions reset=all border cback=white noborder ;* xpixels=1000 ypixels=1000; legend1 label=('Applications') across=1 frame position=(bottom right outside) ; proc gmap map=maps.SWEDEN data=both_maps_info; id ID; choro No_Disbursed/anno=LTV_Anno2 coutline=graycc legend=legend1; %titlefix1(Disbursed MM and median LTV per county); run;
With sas/graph proc gmap, and device=png (but probably not device=javaimg or actximg), here is a way to do it ...
To create extra white-space above and below the map, you can use blank titles and footnotes, such as:
title1 height=15pct " ";
footnote1 h=15pct " ";
To create extra white-space to the left and right of the map, you can use blank titles, angled so they are on the left and right of the map:
title1 a=90 h=15pct " ";
title2 a=-90 h=15pct " ";
You can adjust the height of this blank title text to consume whatever percent of the page you want.
Once you have this white-space, the annotated text can extend out into that space.
(I go over this in more detail in Example 7, p. 47 in my book SAS/Graph - Beyond the Basics)
You might want to share a few observations from the Annotate data set.
One of the approaches would involve the XSYS and YSYS variable values in the annotate data set. The image you shared makes me think that you are using XSYS/YSYS of 1 or 2 (or 7 / 😎 which would be the DATA area. Using 3 or 9 would use more of the Graphics output area but you may need to adjust your whole coordinate space, 5 or B would allow you to address procedure space.
With sas/graph proc gmap, and device=png (but probably not device=javaimg or actximg), here is a way to do it ...
To create extra white-space above and below the map, you can use blank titles and footnotes, such as:
title1 height=15pct " ";
footnote1 h=15pct " ";
To create extra white-space to the left and right of the map, you can use blank titles, angled so they are on the left and right of the map:
title1 a=90 h=15pct " ";
title2 a=-90 h=15pct " ";
You can adjust the height of this blank title text to consume whatever percent of the page you want.
Once you have this white-space, the annotated text can extend out into that space.
(I go over this in more detail in Example 7, p. 47 in my book SAS/Graph - Beyond the Basics)
Thanks! Had to check the option to include titles inside the image but that worked!
As the ballardw pointed out I had used XSYS/YSYS 2 but I took the ease route and just added some white space 🙂
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.