R中沿着相同x轴的不同组的多个图线

时间:2015-06-05 13:48:05

标签: r

我有一个如下所示的数据集:

    period  user_id score
1   05/31/2015  X3  0
2   05/30/2015  X3  0
3   05/29/2015  X3  0.162219538968167
4   05/28/2015  X3  0
5   05/27/2015  X3  0
6   05/26/2015  X3  0
7   05/25/2015  X3  0
8   05/24/2015  X3  0
9   05/23/2015  X3  0.157164092255607
10  05/22/2015  X3  0.24244
11  05/21/2015  X3  0
12  05/20/2015  X3  0.165628395061728
13  05/19/2015  X3  0
14  05/18/2015  X3  0
15  05/17/2015  X3  0.295934387351779
16  05/16/2015  X3  0.171402352941176
17  05/15/2015  X3  0
18  05/14/2015  X3  0
19  05/13/2015  X3  0
20  05/12/2015  X3  0
21  05/11/2015  X3  0
22  05/10/2015  X3  0
23  05/09/2015  X3  0.155986274509804
24  05/08/2015  X3  0
25  05/07/2015  X3  0.106522983114447
26  05/06/2015  X3  0
27  05/05/2015  X3  0.0995682386932387
28  05/04/2015  X3  0.146144206773619
29  05/03/2015  X3  0
30  05/02/2015  X3  0
31  05/01/2015  X3  0
32  04/30/2015  X3  0
33  04/29/2015  X3  0.139891981132075
34  04/28/2015  X3  0
35  04/27/2015  X3  0
36  04/26/2015  X3  0
37  04/25/2015  X3  0.177005796285875
38  04/24/2015  X3  0
39  04/23/2015  X3  0.252415
40  04/22/2015  X3  0.174262075561932
41  04/21/2015  X3  0
42  04/20/2015  X3  0.235634401114206
43  04/19/2015  X3  0
44  04/18/2015  X3  0
45  04/17/2015  X3  0
46  04/16/2015  X3  0.18311858974359
47  04/15/2015  X3  0
48  04/14/2015  X3  0
49  04/13/2015  X3  0
50  04/12/2015  X3  0
51  04/11/2015  X3  0
52  04/10/2015  X3  0
53  04/09/2015  X3  0.23201178343949
54  04/08/2015  X3  0.2179148
55  04/07/2015  X3  0
56  04/06/2015  X3  0
57  04/05/2015  X3  0
58  04/04/2015  X3  0.23909529343405
59  04/03/2015  X3  0
60  04/02/2015  X3  0
61  04/01/2015  X3  0
62  03/31/2015  X3  0
63  03/30/2015  X3  0
64  03/29/2015  X3  0.186837311557789
65  03/28/2015  X3  0
66  03/27/2015  X3  0
67  03/26/2015  X3  0
68  03/25/2015  X3  0
69  03/24/2015  X3  0
70  03/23/2015  X3  0.228757978723404
71  03/22/2015  X3  0
72  03/21/2015  X3  0
73  03/20/2015  X3  0
74  03/19/2015  X3  0.204157835820896
75  03/18/2015  X3  0
76  03/17/2015  X3  0
77  03/16/2015  X3  0
78  03/15/2015  X3  0
79  03/14/2015  X3  0
80  03/13/2015  X3  0
81  03/12/2015  X3  0.218027027027027
82  03/11/2015  X3  0
83  03/10/2015  X3  0
84  03/09/2015  X3  0
85  03/08/2015  X3  0
86  03/07/2015  X3  0
87  03/06/2015  X3  0
88  03/05/2015  X3  0
89  03/04/2015  X3  0
90  03/03/2015  X3  0
91  03/02/2015  X3  0.206770705521472
92  03/01/2015  X3  0.1653779296875
93  02/28/2015  X3  0
94  02/27/2015  X3  0.234052419354839
95  02/26/2015  X3  0
96  02/25/2015  X3  0
97  02/24/2015  X3  0.218886066763425
98  02/23/2015  X3  0
99  02/22/2015  X3  0.406275
100 02/21/2015  X3  0.156673901808785
101 02/20/2015  X3  0.223233096085409
102 02/19/2015  X3  0
103 02/18/2015  X3  0
104 02/17/2015  X3  0.179015625
105 02/16/2015  X3  0.211404653802497
106 02/15/2015  X3  0
107 02/14/2015  X3  0.222168965517241
108 02/13/2015  X3  0
109 02/12/2015  X3  0
110 02/11/2015  X3  0.235236577181208
111 02/10/2015  X3  0.65075
112 02/09/2015  X3  0.356533425414365
113 02/08/2015  X3  0
114 02/07/2015  X3  0
115 02/06/2015  X3  0
116 02/05/2015  X3  0.215846244131455
117 02/04/2015  X3  0.20704222972973
118 02/03/2015  X3  0.25083275862069
119 02/02/2015  X3  0.226984482758621
120 02/01/2015  X3  0
121 01/31/2015  X3  0.352725509214355
122 01/30/2015  X3  0.27242987804878
123 01/29/2015  X3  0.34329012345679
124 01/28/2015  X3  0.225560617469879
125 01/27/2015  X3  0.258603053435114
126 01/26/2015  X3  0
127 01/25/2015  X3  0
128 01/24/2015  X3  0.242096774193548
129 01/23/2015  X3  0.345193965517241
130 01/22/2015  X3  0.219057262569832
131 01/21/2015  X3  0
132 01/20/2015  X3  0.217759145327569
133 01/19/2015  X3  0.34336258776329
134 01/18/2015  X3  0
135 01/17/2015  X3  0
136 01/16/2015  X3  0.259820388349514
137 01/15/2015  X3  0.220515151515151
138 01/14/2015  X3  0
139 01/13/2015  X3  0.236760245901639
140 01/12/2015  X3  0.205189641744548
141 01/11/2015  X3  0
142 01/10/2015  X3  0.187285714285714
143 01/09/2015  X3  0.251222222222222
144 01/08/2015  X3  0
145 01/07/2015  X3  0
146 01/06/2015  X3  0
147 01/05/2015  X3  0
148 01/04/2015  X3  0
149 01/03/2015  X3  0
150 01/02/2015  X3  0
151 01/01/2015  X3  0
152 12/31/2014  X3  0
153 12/30/2014  X3  0
154 12/29/2014  X3  0
155 12/28/2014  X3  0
156 12/27/2014  X3  0
157 12/26/2014  X3  0
158 12/25/2014  X3  0
159 12/24/2014  X3  0
160 12/23/2014  X3  0
161 12/22/2014  X3  0
162 12/21/2014  X3  0.186778735632184
163 12/20/2014  X3  0
164 12/19/2014  X3  0.253548865619546
165 12/18/2014  X3  0.457617021276596
166 12/17/2014  X3  0.212145555555556
167 12/16/2014  X3  0.233976448011165
168 12/15/2014  X3  0.368757785467128
169 12/14/2014  X3  0
170 12/13/2014  X3  0.289272346368715
171 12/12/2014  X3  0
172 12/11/2014  X3  0.258159638554217
173 12/10/2014  X3  0.583865896534405
174 12/09/2014  X3  0
175 12/08/2014  X3  0
176 12/07/2014  X3  0.201875
177 12/06/2014  X3  0
178 12/05/2014  X3  0
179 12/04/2014  X3  0
180 12/03/2014  X3  0
181 12/02/2014  X3  0
182 12/01/2014  X3  0
183 11/30/2014  X3  0
184 11/29/2014  X3  0
185 11/28/2014  X3  0
186 11/27/2014  X3  0
187 11/26/2014  X3  0.195063876651982
188 11/25/2014  X3  0
189 11/24/2014  X3  0.466919540229885
190 11/23/2014  X3  0
191 11/22/2014  X3  0
192 11/21/2014  X3  0.374519230769231
193 11/20/2014  X3  0.252068181818182
194 11/19/2014  X3  0
195 11/18/2014  X3  0
196 11/17/2014  X3  0
197 11/16/2014  X3  0
198 11/15/2014  X3  0
199 11/14/2014  X3  0
200 11/13/2014  X3  0
201 11/12/2014  X3  0
202 11/11/2014  X3  0
203 11/10/2014  X3  0
204 11/09/2014  X3  0
205 11/08/2014  X3  0
206 11/07/2014  X3  0
207 11/06/2014  X3  0
208 11/05/2014  X3  0
209 11/04/2014  X3  0
210 11/03/2014  X3  0
211 11/02/2014  X3  0
212 11/01/2014  X3  0
213 10/31/2014  X3  0
214 10/30/2014  X3  0
215 10/29/2014  X3  0
216 10/28/2014  X3  0
217 10/27/2014  X3  0
218 10/26/2014  X3  0
219 10/25/2014  X3  0
220 10/24/2014  X3  0
221 10/23/2014  X3  0.7505
222 10/22/2014  X3  0
223 10/21/2014  X3  0
224 10/20/2014  X3  0
225 10/19/2014  X3  0
226 10/18/2014  X3  0
227 10/17/2014  X3  0
228 10/16/2014  X3  0
229 10/15/2014  X3  0
230 10/14/2014  X3  0
231 10/13/2014  X3  0
232 10/12/2014  X3  0
233 10/11/2014  X3  0
234 10/10/2014  X3  0
235 10/09/2014  X3  0
236 10/08/2014  X3  0
237 10/07/2014  X3  0
238 10/06/2014  X3  0
239 10/05/2014  X3  0
240 10/04/2014  X3  0
241 10/03/2014  X3  0
242 10/02/2014  X3  0
243 10/01/2014  X3  0
244 09/30/2014  X3  0
245 09/29/2014  X3  0
246 09/28/2014  X3  0
247 09/27/2014  X3  0
248 09/26/2014  X3  0
249 09/25/2014  X3  0
250 09/24/2014  X3  0
251 09/23/2014  X3  0
252 09/22/2014  X3  0
253 09/21/2014  X3  0
254 09/20/2014  X3  0
255 05/31/2015  X13 0
256 05/30/2015  X13 0
257 05/29/2015  X13 0
258 05/28/2015  X13 0
259 05/27/2015  X13 0
260 05/26/2015  X13 0
261 05/25/2015  X13 0
262 05/24/2015  X13 0
263 05/23/2015  X13 0
264 05/22/2015  X13 0.475263888888889
265 05/21/2015  X13 0
266 05/20/2015  X13 0
267 05/19/2015  X13 0
268 05/18/2015  X13 0
269 05/17/2015  X13 0
270 05/16/2015  X13 0.231456034482759
271 05/15/2015  X13 0
272 05/14/2015  X13 0
273 05/13/2015  X13 0
274 05/12/2015  X13 0
275 05/11/2015  X13 0
276 05/10/2015  X13 0
277 05/09/2015  X13 0
278 05/08/2015  X13 0.324601123595506
279 05/07/2015  X13 0
280 05/06/2015  X13 0.608548076923077
281 05/05/2015  X13 0
282 05/04/2015  X13 0
283 05/03/2015  X13 0
284 05/02/2015  X13 0
285 05/01/2015  X13 0
286 04/30/2015  X13 0
287 04/29/2015  X13 0
288 04/28/2015  X13 0
289 04/27/2015  X13 0.6175
290 04/26/2015  X13 0
291 04/25/2015  X13 0
292 04/24/2015  X13 0
293 04/23/2015  X13 0.5909
294 04/22/2015  X13 0.5909
295 04/21/2015  X13 0
296 04/20/2015  X13 0
297 04/19/2015  X13 0
298 04/18/2015  X13 0
299 04/17/2015  X13 0.6175
300 04/16/2015  X13 0
301 04/15/2015  X13 0
302 04/14/2015  X13 0
303 04/13/2015  X13 0
304 04/12/2015  X13 0
305 04/11/2015  X13 0
306 04/10/2015  X13 0
307 04/09/2015  X13 0
308 04/08/2015  X13 0
309 04/07/2015  X13 0.416267369727047
310 04/06/2015  X13 0
311 04/05/2015  X13 0
312 04/04/2015  X13 0
313 04/03/2015  X13 0
314 04/02/2015  X13 0
315 04/01/2015  X13 0
316 03/31/2015  X13 0
317 03/30/2015  X13 0
318 03/29/2015  X13 0
319 03/28/2015  X13 0
320 03/27/2015  X13 0
321 03/26/2015  X13 0
322 03/25/2015  X13 0
323 03/24/2015  X13 0
324 03/23/2015  X13 0.7505
325 03/22/2015  X13 0
326 03/21/2015  X13 0
327 03/20/2015  X13 0
328 03/19/2015  X13 0
329 03/18/2015  X13 0
330 03/17/2015  X13 0
331 03/16/2015  X13 0
332 03/15/2015  X13 0
333 03/14/2015  X13 0
334 03/13/2015  X13 0
335 03/12/2015  X13 0
336 03/11/2015  X13 0
337 03/10/2015  X13 0
338 03/09/2015  X13 0.322683333333333
339 03/08/2015  X13 0
340 03/07/2015  X13 0
341 03/06/2015  X13 0
342 03/05/2015  X13 0
343 03/04/2015  X13 0
344 03/03/2015  X13 0
345 03/02/2015  X13 0
346 03/01/2015  X13 0
347 02/28/2015  X13 0
348 02/27/2015  X13 0
349 02/26/2015  X13 0
350 02/25/2015  X13 0
351 02/24/2015  X13 0
352 02/23/2015  X13 0
353 02/22/2015  X13 0
354 02/21/2015  X13 0
355 02/20/2015  X13 0
356 02/19/2015  X13 0
357 02/18/2015  X13 0
358 02/17/2015  X13 0
359 02/16/2015  X13 0
360 02/15/2015  X13 0
361 02/14/2015  X13 0
362 02/13/2015  X13 0
363 02/12/2015  X13 0
364 02/11/2015  X13 0
365 02/10/2015  X13 0
366 02/09/2015  X13 0
367 02/08/2015  X13 0
368 02/07/2015  X13 0
369 02/06/2015  X13 0
370 02/05/2015  X13 0
371 02/04/2015  X13 0
372 02/03/2015  X13 0
373 02/02/2015  X13 0
374 02/01/2015  X13 0
375 01/31/2015  X13 0
376 01/30/2015  X13 0
377 01/29/2015  X13 0
378 01/28/2015  X13 0
379 01/27/2015  X13 0
380 01/26/2015  X13 0
381 01/25/2015  X13 0
382 01/24/2015  X13 0
383 01/23/2015  X13 0
384 01/22/2015  X13 0
385 01/21/2015  X13 0
386 01/20/2015  X13 0
387 01/19/2015  X13 0
388 01/18/2015  X13 0
389 01/17/2015  X13 0
390 01/16/2015  X13 0
391 01/15/2015  X13 0
392 01/14/2015  X13 0
393 01/13/2015  X13 0
394 01/12/2015  X13 0
395 01/11/2015  X13 0
396 01/10/2015  X13 0
397 01/09/2015  X13 0
398 01/08/2015  X13 0
399 01/07/2015  X13 0
400 01/06/2015  X13 0
401 01/05/2015  X13 0
402 01/04/2015  X13 0.189743243243243
403 01/03/2015  X13 0
404 01/02/2015  X13 0
405 01/01/2015  X13 0
406 12/31/2014  X13 0
407 12/30/2014  X13 0
408 12/29/2014  X13 0
409 12/28/2014  X13 0
410 12/27/2014  X13 0
411 12/26/2014  X13 0
412 12/25/2014  X13 0
413 12/24/2014  X13 0
414 12/23/2014  X13 0
415 12/22/2014  X13 0
416 12/21/2014  X13 0
417 12/20/2014  X13 0
418 12/19/2014  X13 0
419 12/18/2014  X13 0
420 12/17/2014  X13 0
421 12/16/2014  X13 0
422 12/15/2014  X13 0
423 12/14/2014  X13 0
424 12/13/2014  X13 0
425 12/12/2014  X13 0
426 12/11/2014  X13 0.7505
427 12/10/2014  X13 0
428 12/09/2014  X13 0
429 12/08/2014  X13 0
430 12/07/2014  X13 0
431 12/06/2014  X13 0.349887878787879
432 12/05/2014  X13 0
433 12/04/2014  X13 0.47025
434 12/03/2014  X13 0
435 12/02/2014  X13 0
436 12/01/2014  X13 0
437 11/30/2014  X13 0.558823529411765
438 11/29/2014  X13 0.397385
439 11/28/2014  X13 0
440 11/27/2014  X13 0
441 11/26/2014  X13 0
442 11/25/2014  X13 0
443 11/24/2014  X13 0
444 11/23/2014  X13 0
445 11/22/2014  X13 0
446 11/21/2014  X13 0
447 11/20/2014  X13 0
448 11/19/2014  X13 0
449 11/18/2014  X13 0
450 11/17/2014  X13 0
451 11/16/2014  X13 0
452 11/15/2014  X13 0
453 11/14/2014  X13 0
454 11/13/2014  X13 0
455 11/12/2014  X13 0
456 11/11/2014  X13 0.4409425
457 11/10/2014  X13 0
458 11/09/2014  X13 0
459 11/08/2014  X13 0
460 11/07/2014  X13 0
461 11/06/2014  X13 0
462 11/05/2014  X13 0
463 11/04/2014  X13 0
464 11/03/2014  X13 0
465 11/02/2014  X13 0
466 11/01/2014  X13 0
467 10/31/2014  X13 0
468 10/30/2014  X13 0.414184426229508
469 10/29/2014  X13 0
470 10/28/2014  X13 0
471 10/27/2014  X13 0.409133333333333
472 10/26/2014  X13 0.7505
473 10/25/2014  X13 0
474 10/24/2014  X13 0
475 10/23/2014  X13 0
476 10/22/2014  X13 0
477 10/21/2014  X13 0.4928125
478 10/20/2014  X13 0
479 10/19/2014  X13 0
480 10/18/2014  X13 0
481 10/17/2014  X13 0
482 10/16/2014  X13 0.3963875
483 10/15/2014  X13 0
484 10/14/2014  X13 0
485 10/13/2014  X13 0
486 10/12/2014  X13 0
487 10/11/2014  X13 0
488 10/10/2014  X13 0.53314071969697
489 10/09/2014  X13 0
490 10/08/2014  X13 0
491 10/07/2014  X13 0
492 10/06/2014  X13 0
493 10/05/2014  X13 0.7505
494 10/04/2014  X13 0
495 10/03/2014  X13 0
496 10/02/2014  X13 0
497 10/01/2014  X13 0.398863309352518
498 09/30/2014  X13 0
499 09/29/2014  X13 0.461568965517241
500 09/28/2014  X13 0
501 09/27/2014  X13 0
502 09/26/2014  X13 0
503 09/25/2014  X13 0.522702127659574
504 09/24/2014  X13 0
505 09/23/2014  X13 0
506 09/22/2014  X13 0.43025
507 09/21/2014  X13 0.355530303030303
508 09/20/2014  X13 0
509 05/31/2015  X16 0
510 05/30/2015  X16 0
511 05/29/2015  X16 0
512 05/28/2015  X16 0
513 05/27/2015  X16 0
514 05/26/2015  X16 0
515 05/25/2015  X16 0
516 05/24/2015  X16 0
517 05/23/2015  X16 0
518 05/22/2015  X16 0.301846666666667
519 05/21/2015  X16 0
520 05/20/2015  X16 0
521 05/19/2015  X16 0.180939518072289
522 05/18/2015  X16 0
523 05/17/2015  X16 0
524 05/16/2015  X16 0
525 05/15/2015  X16 0
526 05/14/2015  X16 0
527 05/13/2015  X16 0
528 05/12/2015  X16 0
529 05/11/2015  X16 0.254190366972477
530 05/10/2015  X16 0
531 05/09/2015  X16 0
532 05/08/2015  X16 0
533 05/07/2015  X16 0
534 05/06/2015  X16 0
535 05/05/2015  X16 0.110203760578761
536 05/04/2015  X16 0
537 05/03/2015  X16 0
538 05/02/2015  X16 0
539 05/01/2015  X16 0
540 04/30/2015  X16 0
541 04/29/2015  X16 0
542 04/28/2015  X16 0
543 04/27/2015  X16 0
544 04/26/2015  X16 0
545 04/25/2015  X16 0
546 04/24/2015  X16 0
547 04/23/2015  X16 0
548 04/22/2015  X16 0
549 04/21/2015  X16 0
550 04/20/2015  X16 0
551 04/19/2015  X16 0.171030319148936
552 04/18/2015  X16 0
553 04/17/2015  X16 0
554 04/16/2015  X16 0
555 04/15/2015  X16 0.177335409836066
556 04/14/2015  X16 0

我想在user_idy-axis之间分别绘制每个x-axis的得分。

我试过了:

ggplot(plot4, aes(x = period, y = score, color = user_id)) + geom_line()

但情节看起来很奇怪。PLot

有没有办法做到这一点,以便情节在R中看起来更好?

0 个答案:

没有答案