Greetings,
Currently I'm doing the following in R:
require(zoo)
data <- read.csv(file="summary.csv",sep=",",head=TRUE)
cum = zoo(data$dcomp, as.Date(data$date))
data = zoo(data$compressed, as.Date(data$date))
data <- aggregate(data, identity, tail, 1)
cum <- aggregate(cum, identity, sum, 1)
days = seq(start(data), end(data), "day")
data2 = na.locf(merge(data, zoo(,days)))
plot(data2,xlab='',ylab='compressed bytes',col=rgb(0.18,0.34,0.55))
lines(cum,type="h",col=rgb(0,0.5,0))
Snip of summary.csv:
date,revision,file,lines,nclass,nattr,nrel,bytes,compressed,diff,dcomp
2007-07-25,16,model.xml,96,11,22,5,4035,991,0,0
2007-07-27,17,model.xml,115,16,26,6,4740,1056,53,777
2007-08-09,18,model.xml,106,16,26,7,4966,1136,47,761
2007-08-10,19,model.xml,106,16,26,7,4968,1150,4,202
2007-09-06,81,model.xml,111,16,26,7,5110,1167,13,258
...
The last two lines plot the information I need, and the result resembles the following:
Blue line is the entropy in bytes of the artifact I'm interested. Green lines represent the entropy of the changes.
Now, in this graph, it works well because there isn't a huge difference in scales. But I have other graphs where the green lines become so small one cannot see.
The solution I was looking for, involved two things:
- To move the green vertical lines to a second graph, just below the first one, with its own y axis, but shared x axis.
- To provide it a logarithmic scale, since I'm more interested in the "magnitude", than in the specific values.
Thanks in advance!
P.S. If someone can also tell me how could I put "minor ticks" in the x scale referring to the months, I appreciate :-) If these are too much questions for a single post, I can divide them further.


