<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Courier New, Courier, monospace">Question. When I use the
code below to print <br>
a list of values to the right of my graph,<br>
the colorkey list appears unusual. At the top <br>
the list of percentages tops out at 90.87%<br>
instead of the expected 100%. The 100% appears<br>
at the bottom below the lowest percent 14.29%. <br>
<br>
The numbers of tx3_sp CK_PCT are read in as follows. <br>
ID is the PCT and CK_PCT is what's plotted. <br>
<small><small>> tx3_sp<br>
An object of class “SpatialPolygonsDataFrame”<br>
Slot "data":<br>
PCT CD COMM JP LD SB SS CK_TOT CK_PCT TOT_VOTE<br>
1 1120 CD-03 COMM01 JP-3 LD-102 SB-12 SS-16 1693 90.87% 1863<br>
2 1121 CD-05 COMM01 JP-3 LD-102 SB-12 SS-16 634 54.28% 1168<br>
3 1124 CD-05 COMM01 JP-3 LD-102 SB-12 SS-16 584 43.39% 1346<br>
4 1135 CD-32 COMM01 JP-3 LD-102 SB-12 SS-08 815 33.51% 2432<br>
5 1136 CD-32 COMM01 JP-3 LD-102 SB-12 SS-08 446 52.84% 844<br>
6 1719 CD-03 COMM01 JP-3 LD-102 SB-12 SS-16 1392 68.17% 2042<br>
7 1720 CD-03 COMM01 JP-3 LD-102 SB-12 SS-16 523 66.20% 790<br>
8 1723 CD-03 COMM01 JP-3 LD-102 SB-12 SS-16 788 82.34% 957<br>
9 1724 CD-03 COMM01 JP-3 LD-102 SB-12 SS-16 994 69.41% 1432<br>
10 1725 CD-32 COMM01 JP-3 LD-102 SB-12 SS-16 31 59.62% 52<br>
11 1802 CD-32 COMM01 JP-3 LD-102 SB-12 SS-08 999 44.20% 2260<br>
12 1803 CD-32 COMM01 JP-3 LD-102 SB-12 SS-08 672 44.24% 1519<br>
13 1804 CD-32 COMM01 JP-3 LD-102 SB-12 SS-08 280 39.94% 701<br>
14 1805 CD-32 COMM01 JP-3 LD-102 SB-12 SS-08 654 48.12% 1359<br>
15 1806 CD-32 COMM01 JP-3 LD-102 SB-12 SS-08 495 37.61% 1316<br>
16 1807 CD-32 COMM01 JP-3 LD-102 SB-12 SS-08 695 40.81% 1703<br>
17 1809 CD-32 COMM01 JP-3 LD-102 SB-12 SS-08 563 47.11% 1195<br>
18 1810 CD-32 COMM01 JP-3 LD-102 SB-12 SS-08 461 42.92% 1074<br>
19 1811 CD-32 COMM01 JP-3 LD-102 SB-12 SS-08 779 42.61% 1828<br>
20 1812 CD-32 COMM01 JP-3 LD-102 SB-12 SS-08 585 37.77% 1549<br>
21 1816 CD-32 COMM01 JP-3 LD-102 SB-12 SS-08 311 32.16% 967<br>
22 1817 CD-32 COMM01 JP-3 LD-102 SB-12 SS-08 528 44.18% 1195<br>
23 1819 CD-32 COMM01 JP-3 LD-102 SB-12 SS-08 338 47.88% 706<br>
24 1820 CD-32 COMM01 JP-3 LD-102 SB-12 SS-16 305 70.11% 435<br>
25 1821 CD-03 COMM01 JP-3 LD-102 SB-12 SS-16 617 74.07% 833<br>
26 2115 CD-03 COMM02 JP-2 LD-102 SB-12 SS-16 1 14.29% 7<br>
27 2121 CD-03 COMM02 JP-2 LD-102 SB-12 SS-16 646 50.91% 1269<br>
28 2122 CD-03 COMM02 JP-2 LD-102 SB-12 SS-16 120 60.00% 200<br>
29 2126 CD-03 COMM02 JP-2 LD-102 SB-12 SS-16 511 57.55% 888<br>
30 2127 CD-03 COMM02 JP-2 LD-102 SB-12 SS-16 522 41.04% 1272<br>
31 2128 CD-03 COMM02 JP-2 LD-102 SB-12 SS-16 390 49.49% 788<br>
32 2129 CD-05 COMM02 JP-2 LD-102 SB-12 SS-16 243 41.33% 588<br>
33 2150 CD-03 COMM02 JP-2 LD-102 SB-12 SS-16 2 100.00% 2<br>
34 2151 CD-05 COMM02 JP-2 LD-102 SB-12 SS-16 36 38.71% 93<br>
35 2200 CD-03 COMM02 JP-3 LD-102 SB-12 SS-16 959 88.39% 1085<br>
36 2204 CD-05 COMM02 JP-3 LD-102 SB-12 SS-16 363 90.07% 403<br>
37 2205 CD-03 COMM02 JP-3 LD-102 SB-12 SS-16 921 90.38% 1019<br>
38 2206 CD-05 COMM02 JP-3 LD-102 SB-12 SS-16 704 45.77% 1538<br>
</small></small><br>
<br>
<br>
Is there any way to move the 100% to the top<br>
when the colorkey legend prints? <br>
<br>
spplot(tx3_sp, c("CK_PCT"), <br>
names.attr = c("Carol Kent 2008"),<br>
colorkey=list(height=1.0, width=0.6),<br>
main = "HD102 - Carol Kent",<br>
sp.layout = list("sp.text",coordinates(tx3_sp),<br>
as.character(tx3_sp$PCT,cex = .02),<br>
as.table = TRUE))<br>
<br>
See the attached jpg file. I hope this goes through.<br>
<br>
Forgive my dumb question as I am new to R. I like<br>
R after reading the NYTIMES article last week; <br>
"Data Analysts Mesermized by Power of R". Query<br>
the NYTIMES for this. And read the "Are U Ready<br>
for R" article with its comments as well. <br>
<br>
Thanks,<br>
Jim Burke<br>
<br>
</font><br>
<font face="Courier New, Courier, monospace"><br>
</font>
</body>
</html>