This is my R script:
#!/usr/bin/env Rscript
library (ggplot2)
data = read.table ("downloads.txt", header=T)
data$number = factor (data$Size)
data$PITtype = factor (data$PITtype)
g.all <- ggplot (data, aes (x=Time, y=number, color=PITtype)) +
geom_point (size=2) +
geom_line () +
ylab ("# Pending Downloads") +
theme_bw ()
png ("pendingDownloads_graph.png", width=800, height=800)
print (g.all)
x = dev.off ()
and this a set of data that I used:
Time PITtype Size
3 SimplePIT 60
6.25 SimplePIT 127
9.5 SimplePIT 197
12.75 SimplePIT 249
16 SimplePIT 319
19.25 SimplePIT 381
22.5 SimplePIT 459
25.75 SimplePIT 531
29 SimplePIT 594
32.25 SimplePIT 668
35.5 SimplePIT 723
38.75 SimplePIT 774
42 SimplePIT 851
45.25 SimplePIT 902
48.5 SimplePIT 959
51.75 SimplePIT 1020
55 SimplePIT 1092
58.25 SimplePIT 1167
61.5 SimplePIT 1223
64.75 SimplePIT 1283
68 SimplePIT 1337
71.25 SimplePIT 1420
74.5 SimplePIT 1515
77.75 SimplePIT 1607
81 SimplePIT 1662
84.25 SimplePIT 1728
87.5 SimplePIT 1792
90.75 SimplePIT 1854
94 SimplePIT 1931
I got this strange graph (see the 'y' axes that is all black) http://i40.tinypic.com/2dvivdf.png and this error: geom_path: Each group consist of only one observation. Do you need to adjust the group aesthetic?
What's up?
number
as a factor, and each number is unique, you've got a factor with as many levels as rows. What are you trying to do here? Why create a factor? – Spacedman