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

Hello Everybody,

 

I need to figure out how to create a world map where two dummy variables (1-0) are plotted on one world map.  I need either:

 

1.  color variation for one variable and pattern variation for the second or

2.  pattern variation for one variable and country "perimeter" bolding for the other.

 

My current code to plot the first variable named potential1 is:

 

proc gmap data=ma3 map=mapsgfk.world gout=gseg ;
id idname;
choro potential1 / levels=2 coutline=black name='map1a' ;
pattern1 v=solid repeat=48;
run;

 

Thanks eveybody

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

If you want things to change in a choro plot then you only have one variable to use. So you may need to combine the values of the two variables to create each combination.

 

 

Changing Border appearance conditionally I have only been able to do with annotate data that basically traces the border with different properties. If you want the outline color to match the pattern filling the area use COUTLINE=SAME. If by "bolding" a border you want all borders the same width use the WOUTLINE= option. If you want different widths then you'll need to go the annotate route.

 

Another option is to use the map data set to create Polygon plots in SGPLOT and use a DATTERMAP data set to set properties for the polygons. Again that would use a single variable but I believe that would let you set the associated "border", with polygon it is outline, color, line pattern and thickness.

 

In any case adjacent borders may have issues with differing widths/color and which is drawn over the other using the same coordinates.

View solution in original post

2 REPLIES 2
ballardw
Super User

If you want things to change in a choro plot then you only have one variable to use. So you may need to combine the values of the two variables to create each combination.

 

 

Changing Border appearance conditionally I have only been able to do with annotate data that basically traces the border with different properties. If you want the outline color to match the pattern filling the area use COUTLINE=SAME. If by "bolding" a border you want all borders the same width use the WOUTLINE= option. If you want different widths then you'll need to go the annotate route.

 

Another option is to use the map data set to create Polygon plots in SGPLOT and use a DATTERMAP data set to set properties for the polygons. Again that would use a single variable but I believe that would let you set the associated "border", with polygon it is outline, color, line pattern and thickness.

 

In any case adjacent borders may have issues with differing widths/color and which is drawn over the other using the same coordinates.

Dim13
Obsidian | Level 7

Thanks,

I guess I had not thought of combining them into one variable - since it is only two dummy variables.  I think this will work.

Will do so,

thanks again,

Best

Dimitrios

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 784 views
  • 0 likes
  • 2 in conversation