[R] ggplot2 Xlim
Felipe Carrillo
mazatlanmexico at yahoo.com
Wed Dec 24 18:31:11 CET 2008
Hi: I need some help.
I am ploting a bar graph but I can't adjust my x axis scale
I use this code:
i <- qplot(ForkLength,Number,data=FL,geom="bar")
i + geom_bar(colour="blue",fill="grey65") # too crowded
FL_dat <- ggplot(FL,aes(x=ForkLength,y=Number)) + geom_bar(colour="green",fill="grey65")
FL_dat + scale_x_continuous(limits=c(20,170)) # Can't see anything
FL Number
29 22.9
30 63.4
31 199.3
32 629.6
33 2250.1
34 7452.5
35 19352.9
36 17655.5
37 13020.6
38 5856.0
39 2039.4
40 1261.2
41 780.2
42 826.6
43 739.0
44 608.2
45 694.3
46 599.5
47 690.4
48 762.9
49 594.6
50 771.7
51 695.3
52 784.5
53 780.1
54 823.6
55 883.2
56 747.6
57 834.4
58 716.7
59 632.8
60 670.4
61 511.0
62 577.4
63 538.0
64 452.3
65 451.7
66 355.7
67 294.1
68 278.8
69 165.5
70 208.7
71 161.6
72 159.9
73 100.9
74 84.4
75 110.3
76 69.3
77 60.7
78 63.2
79 28.8
80 46.1
81 34.6
82 37.1
83 35.5
84 35.7
85 24.3
86 17.5
87 24.9
88 21.5
89 17.4
90 14.0
91 7.8
92 10.1
93 6.8
94 2.9
95 4.0
96 7.3
97 4.6
98 4.0
99 1.7
100 5.0
101 11.3
102 3.0
103 5.2
104 9.4
105 6.4
106 1.0
107 8.5
108 8.6
109 10.1
110 9.0
111 11.7
112 16.0
113 3.1
114 7.6
115 3.9
116 7.0
117 6.9
118 8.1
119 2.0
121 3.7
122 1.9
123 4.0
124 6.3
126 2.0
127 2.0
128 1.0
129 2.0
132 2.0
134 7.3
135 1.0
136 1.0
139 1.0
142 1.0
145 1.0
152 2.0
161 2.5
172 1.0
Felipe D. Carrillo
Supervisory Fishery Biologist
Department of the Interior
US Fish & Wildlife Service
California, USA
More information about the R-help
mailing list