Sample 25591: Create an outline map of Africa using PROC GREMOVE
The sample code on the Full Code tab uses the MAPS.AFRICA map data set with PROC GREMOVE to produce a new map data set that contains no internal boundaries.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample uses the MAPS.AFRICA map data set with PROC GREMOVE to produce a new map data set that contains no internal boundaries.
The graphics output in the Results tab was produced using SAS® 9.2. Submitting the sample code with releases of SAS prior to SAS 9.2 might produce different results.
/* Define the libref of MAPS if necessary */
*libname maps 'location-of-map-datasets';
/* Set the graphics environment */
goptions reset=all cback=white border htitle=12pt htext=10pt;
/* Create data set NEWAF */
data newaf;
set maps.africa;
region=1;
run;
/* Remove the unit areas from the AFRICA data set */
proc gremove data=newaf out=africa;
by region;
id id;
run;
/* Add a title to the graph */
title1 'Africa before PROC GREMOVE';
/* Define pattern characteristics */
pattern value=mempty r=50 color=black;
/* Display the original map */
proc gmap map=maps.africa data=maps.africa all;
id id;
choro id / nolegend;
run;
quit;
/* Define a new title for the map */
title1 'Africa after PROC GREMOVE';
/* Display the map */
proc gmap data=africa map=africa;
id region;
choro region / nolegend;
run;
quit;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample uses the MAPS.AFRICA map data set with PROC GREMOVE to produce a new map data set that contains no internal boundaries.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> GMAP Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Types ==> Maps ==> Removing
|
Date Modified: | 2005-09-22 03:03:12 |
Date Created: | 2005-05-23 14:17:35 |
Operating System and Release Information
SAS System | SAS/GRAPH | Tru64 UNIX | 9 TS M0 | |
OpenVMS Alpha | 9 TS M0 | |
Linux | 9 TS M0 | |
HP-UX IPF | 9 TS M0 | |
64-bit Enabled Solaris | 9 TS M0 | |
64-bit Enabled HP-UX | 9 TS M0 | |
64-bit Enabled AIX | 9 TS M0 | |
Microsoft Windows XP Professional | 9 TS M0 | |
Microsoft Windows Server 2003 Standard Edition | 9 TS M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9 TS M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9 TS M0 | |
Microsoft Windows NT Workstation | 9 TS M0 | |
Microsoft Windows 2000 Professional | 9 TS M0 | |
Microsoft Windows 2000 Server | 9 TS M0 | |
Microsoft Windows 2000 Datacenter Server | 9 TS M0 | |
Microsoft Windows 2000 Advanced Server | 9 TS M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9 TS M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9 TS M0 | |
z/OS | 9 TS M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9 TS M0 | |