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?
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
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
Thank you Dan, this works great. I am shocked the TRANSPARENCY option is not included in the documentation for the SGMAP procedure!
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;
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.
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.