I'm creating a map with labels and I'm running into readability issues. The map has about nineteen automatically generated colours, so labels aren't always fully contrasting with the background. I figured that a way to solve for this problem is to use a white coloured font that is outlined with a black line.
Is there a way to outline fonts in SAS without having to install a new font?
My current map looks like this:
Example of similar map
I would like the font to look like this:
Desired font style
The code I use to define my labels:
You may want to investigate the CBOX option to set a standard color of the "box" that the text appears in to address the contrast between text and map area colors.
There should be catalog, SASHELP.FONTS that contains the fonts SAS Graph uses. The fonts whose names end in E, for 'empty', are outline fonts. SWISSE might be likely candidate as it is similar to Helvetica . From the documentation:
All of the SAS/GRAPH fonts are stored in the catalog SASHELP.FONTS. For many fonts, the last letter or letters of the font name indicates weight or spacing of the font:
empty (outline) versions of their counterparts
uniformly spaced versions of their counterparts; most of the SAS/GRAPH fonts that do not end in U are proportionately spaced. However, the kanji fonts are always uniform.
expanded (wider characters and extra space between characters).
Empty and uniform versions of fonts cannot be used if you have deleted their filled or proportionally spaced counterparts.
The Style= option should set the font for the text of a Label function for the specific text. Use in your data set would be
What procedure are you using to draw the map? The SG procedures (which includes PROC SGMAP) support the BACKFILL, OUTLINE, and BACKLIGHT options. You can experiment with those options to create effects like you want. Here is a link to the SGMAP doc.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.