LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2000, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 13 Jun 2000 14:45:50 +0200
Reply-To:     "Wolf F. Lesener" <wflesener@RZ.HU-BERLIN.DE>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Comments:     To: SAS-L@VM230.akh-wien.ac.at
From:         "Wolf F. Lesener" <wflesener@RZ.HU-BERLIN.DE>
Subject:      Re: Choropleth Map  -- order of items in Legend box
Comments: To: SAS-L@LISTSERV.VT.EDU
In-Reply-To:  <200006121454.QAA05678@suncom.rz.hu-berlin.de>
Content-Type: multipart/mixed;

Hallo Rodney,

I'm not a 'graph master' and my English should be better...

Please have a look at the example I've prepared and attached for you. The map is a subset from SAS delivered MAPS.GERMANY reduced to the state borders. The data are taken from the book "Datenreport 1994" issued from Statistisches Bundesamt. If there are remaining questions, please be so kindly to make a short extract from your data to have the same base for discussions.

The program is made under SAS 6.12 (Windows).

First the program creates a temporarily dataset ELECTS which will be observed by PRINT, MEANS and the variable POLL within a FREQ step only for getting transparency. Next three GMAP steps deal with your problem. First the problem as you have described. It deliveres the MIDPOINT-values used in the second step. To reverse the legend value description it seems to be neccessary to know the midpoint values. It also requires to change the PATTERN order. But I think in both cases ascending or descending printing the interval midpoint only it is a very poor and only a few instructive way to give a legend. Readers have to make some boring operations ... Because of that you should create an user defined value format similar as in the third GMAP step.

Of course the problem can be a little working intensive if you have a lot of changing scales may be dependently by your data. In such cases I've sometimes punched the required statements to include them into the program itselfes by %INCLUDE statement.

Hope it helps a few and good luck to you in Georgia ...

At 10:40 AM 6/12/00 -0400, you wrote: >Graph Masters, > >We are producing Choropleth Maps of continuous response variables with >Levels=4. The levels correspond to percent meeting a desired criteria. >Therefore I would like the legend box to list the four levels in descending >order, not ascending order. So far after RT"Fine"M I have not figured out >how to do this. I know I could do a transform of the response variable >itself but there should be a way to select descending order in the graph >procedure. > >Any suggestions would be appreciated. > >Rodney J. Presley, PhD >Georgia Medical Care Foundation >57 Executive Park South, NE >suite 200 >Atlanta, GA 30329-2224 > >404-982-0411 ext. 7574 >404-982-7592 fax > >rpresley@gmcf.org >


/*#*/%let mark=elections.sas; LIBNAME ATLAS "C:\KURSE\GRAPH\ATLAS"; GOPTIONS RESET=ALL DEV=WIN CBACK=WHITE CTEXT=BLACK; GOPTIONS KEYMAP=WINANSI; GOPTIONS FTEXT=SWISSL; TITLE C=BLACK F=SWISSL H=5 PCT 'Elections for state parliaments in Germany'; FOOTNOTE C=BLACK F=SWISSL H=2.5 PCT J=L 'Source: Datenreport 1994' f=simplex h=.8 j=r "&mark "; DATA ELECTS; LENGTH DEFAULT=4; STATE=_N_; LENGTH NAME $30; FORMAT STATE 2. YEAR 4. POLL CDU SPD FDP GR PDS OTHER 4.1; INPUT NAME & YEAR POLL CDU SPD FDP GR PDS; OTHER=100-SUM(CDU,SPD,FDP,GR,PDS); CARDS; Schleswig-Holstein 1992 71.7 33.8 46.2 5.6 4.97 . Freie und Hansestadt Hamburg 1993 69.9 25.1 40.4 4.2 13.5 . Niedersachsen 1994 73.8 36.4 44.3 4.4 7.4 . Freie Hansestadt Bremen 1991 72.2 30.7 38.8 9.5 11.4 . Nordrhein-Westfalen 1990 71.8 36.7 50.0 5.8 5.0 . Hessen 1991 70.8 40.2 40.8 7.4 8.8 . Rheinland-Pfalz 1991 73.9 38.7 44.8 6.9 6.5 . Baden-Württemberg 1992 70.1 39.6 29.4 5.9 9.5 . Freistaat Bayern 1994 67.8 52.8 30.0 2.8 6.1 . Saarland 1994 83.5 38.6 49.4 2.1 5.5 . Bundeshauptstadt Berlin 1990 80.8 40.4 30.4 7.1 5.0 9.2 Brandenburg 1994 56.3 18.7 54.1 2.2 2.9 18.7 Mecklenburg-Vorpommern 1994 73.1 37.7 29.5 3.8 3.7 22.7 Freistaat Sachsen 1994 58.4 58.1 16.6 1.7 4.1 16.5 Sachsen-Anhalt 1994 54.8 34.4 34.0 3.6 5.1 19.9 Freistaat Thüringen 1994 75.3 42.6 29.6 3.2 4.5 16.6 RUN;

proc print; proc means fw=8 maxdec=2; proc freq; tables poll;

/* using the LEVELS option */ PATTERN1 C=GRAYFF V=S; /* WHITE minimum level */ PATTERN2 C=GRAYC0 V=S; /* LIGHT GRAY second level */ PATTERN3 C=GRAY80 V=S; /* DARK GRAY third level */ PATTERN4 C=GRAY40 V=S; /* VERY DARK GRAY maximum level */ PROC GMAP MAP =ATLAS.D DATA=ELECTS; ID STATE; CHORO POLL / LEVELS =4 COUTLINE =GRAY00; /* BLACK */ RUN; QUIT;

/* using the MIDPOINTS option */ PATTERN1 C=GRAY40 V=S; /* VERY DARK GRAY maximum level */ PATTERN2 C=GRAY80 V=S; /* DARK GRAY third level */ PATTERN3 C=GRAYC0 V=S; /* LIGHT GRAY second level */ PATTERN4 C=GRAYFF V=S; /* WHITE minimum level */ PROC GMAP MAP =ATLAS.D DATA=ELECTS; ID STATE; CHORO POLL / MIDPOINTS= 80 72 64 56 COUTLINE =GRAY00; RUN; QUIT;

/* using the MIDPOINTS option together with a user defined VALUE format */ PATTERN1 C=GRAY40 V=S; /* VERY DARK GRAY maximum level */ PATTERN2 C=GRAY80 V=S; /* DARK GRAY third level */ PATTERN3 C=GRAYC0 V=S; /* LIGHT GRAY second level */ PATTERN4 C=GRAYFF V=S; /* WHITE minimum level */ PROC FORMAT; VALUE POFO 76 - HIGH = '>76%' 68 - 75.99 = '68-76%' 60 - 67.99 = '60-68%' LOW - 59.99 = '<60%'; PROC GMAP MAP =ATLAS.D DATA=ELECTS; ID STATE; CHORO POLL / MIDPOINTS= 80 72 64 56 COUTLINE =GRAY00; FORMAT POLL POFO.; RUN; QUIT;


D.SD2 [application/octet-stream]

Mit freundlichen Gruessen

Ihr Wolf F. Lesener

Humboldt-Universitaet zu Berlin - Rechenzentrum - Unter den Linden 6 10099 Berlin Tel. (030) 2093 2464 Fax. (030) 2093 2959

|------------------------------------------------------------| | Bitte f|r 8.3.-9.3.2001 in Stuttgart-Hohenheim vormerken: | | 5. Konferenz der SAS Anwender in Forschung und Entwicklung | |------------------------------------------------------------|


Back to: Top of message | Previous page | Main SAS-L page