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

I am new to the PROC SGMAP procedure and after reviewing the documentation and online examples I have a question regarding the transparency of the polygons created in the Choromap statement. Currently the only outputs I can produce displays these polygons as opaque which prevents me from viewing information on the openstreet or esri background map. I have experimented with the NOOPAQUE option in the SGMAP statement but it does not seem to effect the opacity of the choromap polygons.

 

Does the GMAP procedure have the functionality to control the opacity of the choromap polygons? Is this a feature i need to control using a graph style template rather than in the SGMAP proc itself?

1 ACCEPTED SOLUTION

Accepted Solutions
DanH_sas
SAS Super FREQ

Use the TRANSPARENCY option on the CHOROMAP statement to do this. For example, TRANSPARENCY=0.5 is 50% transparent. TRANSPARENCY=1.0 is fully transparent 

 

Hope this helps!

Dan

View solution in original post

3 REPLIES 3
DanH_sas
SAS Super FREQ

Use the TRANSPARENCY option on the CHOROMAP statement to do this. For example, TRANSPARENCY=0.5 is 50% transparent. TRANSPARENCY=1.0 is fully transparent 

 

Hope this helps!

Dan

tgrandchamp
Fluorite | Level 6

Thank you Dan, this works great. I am shocked the TRANSPARENCY option is not included in the documentation for the SGMAP procedure!

GraphGuy
Meteorite | Level 14

In your last paragraph you mention GMap (perhaps just a typo, intending SGMap?)

In any event, here's how to use transparency for colors in GMap ... you can specify alpha-transparent colors in the pattern statement.

 

The form of an alpha-transparent color is Arrggbbxx (where xx controls the amount of transparency).

 

Here's an example of a simple GMap, with transparent red polygons, and an image in the background (so you can see that the polygons are transparent):

 

goptions iback='C:\Windows\Web\Wallpaper\Nature\img2.jpg';
pattern1 v=s color=Aff000055;
proc gmap data=maps.us map=maps.us;
id statecode;
choro segment / levels=1 nolegend;
run;

 

gmap_transparent.png

 

 

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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