Can someone kindly help me? I am trying to construct four different graphs as one figure instead of having four different graphs. Thank you Sample data: data texas_state;
set mapsgfk.us_counties;
where ID1='US-48';
if county in (43 109 141 229 243 377) then phr='10';
else
if county in (7 25 47 61 131 215 247 249 261 273 297 311 355
391 409 427 479 489 505) then phr='11';
else
if county in (11 17 45 65 69 75 79 87 107 111 117 125 129 153 169 179 189 191
195 205 211 219 233 269 279 295 303 305 341 345 357 359 369 375 381 393 421
437 445 483 501) then phr='1';
else
if county in (9 23 49 59 77 83 93 101 133 151 155 197 207 237 253 263 275
335 337 353 399 415 417 429 433 441 447 485 487 503) then phr='2';
else
if county in (85 97 113 121 139 143 147 181 221 231 251 257 349 363 367
397 425 439 497) then phr='3';
else
if county in (1 37 63 67 73 119 159 183 203 213 223 277 315 343 365 379
387 401 423 449 459 467 499) then phr='4';
else
if county in (5 199 225 241 245 347 351 361 373 403 405 407 419 455 457) then phr='5';
else
if county in (15 39 71 89 157 167 201 291 321 339 471 473 481) then phr='6';
else
if county in (21 27 31 35 41 51 53 55 99 145 149 161 185 193 209 217 281 287
289 293 299 309 313 331 333 395 411 453 477 491) then phr='7';
else
if county in (13 19 29 57 91 123 127 137 163 171 175 177 187 239 255 259 265 271 283 285
323 325 385 463 465 469 493 507) then phr='8';
else
if county in (3 33 81 95 103 105 115 135 165 173 227 235 267 301 307 317 319 327 329 371
383 389 413 431 435 443 451 461 475 495) then phr='9';
run;
*check contents;
PROC CONTENTS DATA=texas_state;RUN;
* sort map data set in order by new geographic designation;
proc sort data= mydata1.texas_state;
by phr;
run;
* eliminate county boundaries with HSA areas using PROC GREMOVE;
proc gremove
data= mydata1.texas_state
out= mydata1.texas_state_map;
by phr;
id county;run; *year 2;
data WORK.YEAR2_REG;
infile datalines truncover;
input phr:$2. COUNT;
label COUNT="Frequency Count";
datalines;
1 752
2 1470
3 673
4 1336
5 1483
6 676
7 814
8 1285
9 521
10 611
11 733
;
pattern1 value=solid color=CXE5E0EC;
pattern3 value=solid color=CXB2A1C7;
pattern5 value=solid color=CX3F3151;
legend1 label=(position= TOP 'Rate per 100,000 people')
shape=bar(.1in,.1in) value=(justify=right '500 to 600'
'601 to 900' '1201 to 1500')
across=1 origin=(35,12) mode=reserve;
title1 lspace= 5 "YEAR2_DATA";
%ANNOMAC;
%MAPLABEL (MYDATA1.texas_state_map, YEAR2_REG, anno_phr_label, phr,
phr,font=Arial Black,color=red, size=2, hsys=3);
PROC FORMAT;
VALUE count
100 - 600 = '= 600'
601 - 900 = '601 to 900'
1201- 1500 = '1201 to 1500';run;
PROC GMAP DATA = YEAR2_REG MAP = MYDATA1.texas_state_map ALL;
ID phr;
FORMAT count count.;
CHORO count / DISCRETE ANNOTATE = anno_phr_label
legend=legend1;
TITLE 'YEAR2_DATA';
RUN;
... View more