如何使用sas map 绘制地图_第1页
如何使用sas map 绘制地图_第2页
如何使用sas map 绘制地图_第3页
如何使用sas map 绘制地图_第4页
如何使用sas map 绘制地图_第5页
已阅读5页,还剩23页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

如何使用sasmap繪製地圖以台灣地圖為例想一想如何作畫材料1.一張台灣地圖2.一份各地區觀測值資料工具

GMAPprocedure表示方式---平面圖或長方圖Sasmapdatasetsdefaultsaslibrary:MapsTaiwanTaiwan2縣市為最小單位Taiwan:Mapdata-set座標Taiwan2:Responsedataset才能畫界線以鄉鎮為最小單位GMAPprocedureUsethePROCGMAPstatementtoidentifythemapandresponsedatasets.UsetheIDstatementtonametheidentificationvariable(s).UseaBLOCK,CHORO,PRISM,orSURFACEstatementtoidentifytheresponsevariableandgeneratethemapProcedureSyntaxPROCGMAP

MAP=map-data-set

<DATA=response-data-set>

<ALL>

<ANNOTATE=Annotate-data-set>

<GOUT=<libref.>output-catalog>

<IMAGEMAP=output-data-set>

IDid-variable(s);

CHORO

response-variable(s)</option(s)>;

BLOCK

response-variable(s)</option(s)>;

PRISM

response-variable(s)</option(s)>;SURFACE

response-variable(s)</option(s)>;ProducingaSimpleSurfaceMapBasicprocedureSimpleandEasychoroCc

gmapdata=maps.taiwan2map=maps.taiwan

idid;

choro

idname/discrete

coutline=black;run;ResponsedatasetMapdata-setResponsevar.?blockCreatesthree-dimensionalblockmapsonwhichlevelsofmagnitudeofthespecifiedresponsevariablesarerepresentedbyblocksofvaryingheight,pattern,andcolor.

datamap;setmaps.taiwan2;ifidin(5

10

15

20)thenno=5;elseifidin(3

6

9

12

15

18)thenno=3;elseifidin(7

14

21)thenno=7;elseno=0;run;

proc

gmapdata=mapmap=maps.taiwanidid;blockno/discretecoutline=blackCBLKOUT=black;run;prismCreatesthree-dimensionalprismmapsinwhichlevelsofmagnitudeofthespecifiedresponsevariablesarerepresentedbypolyhedrons(raisedpolygons)ofvaryingheight,pattern,andcolor.

proc

gmapdata=mapmap=maps.taiwaidid;prismno/discretecoutline=black;run;Advanceprocedure---

toenhancethemapComplicatedandOptionallegendAnnotateByvarpatternexamplegoptionsreset=all;legend1position=(middlerightinside)label=none shape=bar(1,1)pct mode=share across=1;Datacitystar;……;run;proc

gmapdata=strata8map=d.taiwan;bystrata;idid;chorocity1city/discrete

coutline=black

legend=legend1

annotate=citystar;formatcity1citycity.stratast.;run;MethodGoptions---SetthegraphicsenvironmentPatternLegendAnnotatedatasetChorostatement</options>--appearanceoptions--legendoptions--mappingoptionsGoptions---

setthegraphicsenvironmentoptionsthataffecttheappearanceofthedisplayareaandthegraphicsoutputoptionsthataffectcolor

optionsthatcontrolfontselectionortextappearancegoptions

reset=global

gunit=pctborder

cback=whitecolors=(blackbluegreenred)

ctext=black

ftext=swisshtitle=6

htext=3;

patternpattern1v=msc=LIB;pattern2v=msc=LIBG;V=map/plot-pattern

PlotpatternlegendTheLEGENDstatementcontrolsthelocationandappearanceoflegendsontwo-dimensionalplots,contourplots,maps,andcharts.

legend1position=(middlerightinside)label=none shape=bar(1,1)pct mode=share across=1;Annotatedatasetdata

citystar;lengthfunctionstylecolor$8position$1text$20;retainfunction'label'xsysysys'2'hsys'3'when'a';setxy(keep=ididnamexy);ifidin(3051101111201630710154011327120312141510

1003

1702

619);/*city為縣市代碼*/

ifid>999thencity=substr(id,9,2)*1;

elseifid>99thencity=substr(id,10,1)*1;

elsecity=substr(id,11,2)*1;

ifid^=0;/*strata分層*/

if(idin(63

101

102

103

104

105

106

110

111))or(cityin(63))thenstrata=1;if(idin(107

108

109

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

17))or(cityin(17))thenstrata=2;if(cityin(3

4

5

18))thenstrata=3;if(cityin(6

7

8

19))thenstrata=4;if(cityin(9

20

10

21

11))thenstrata=5;if(cityin(64

12

13

16))thenstrata=6;if(cityin(2

14

15))thenstrata=7;style='special';text='M';color='red';size=7;position='5';output;style='KAI';text=idname;color='yellow';size=5;position='8';output;run;Chorostatement</options>;proc

gmapdata=strata8map=d.taiwan;bystrata;idid;chorocity1/discretecoutline=black

legend=legend1

annotate=citystar;formatcity1city.stratast.;run;appearanceoptionsANNOTATE=Annotate-data-setCEMPTY=empty-area-outline-color

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论