SF.net SVN: gar:[23338] csw/mgar/gar/v2/lib/python/package_age.py

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sun Apr 6 00:09:12 CEST 2014


Revision: 23338
          http://sourceforge.net/p/gar/code/23338
Author:   wahwah
Date:     2014-04-05 22:09:11 +0000 (Sat, 05 Apr 2014)
Log Message:
-----------
package-age: Comments how to generate the hist

It's fiddly to generate the X axis labels.

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/python/package_age.py

Modified: csw/mgar/gar/v2/lib/python/package_age.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package_age.py	2014-04-05 22:08:35 UTC (rev 23337)
+++ csw/mgar/gar/v2/lib/python/package_age.py	2014-04-05 22:09:11 UTC (rev 23338)
@@ -3,6 +3,17 @@
 """Download and generate package age dataset for analysis with R.
 
 It's a toy as of 2014-04-05.
+
+To draw a histogram of package ages, run this in R:
+
+data <- read.table(file="/media/ivy-shared/package-ages.txt", header=TRUE,
+                   colClasses=c("factor", "factor", "Date"))
+
+png(filename="package-ages.png", width=1024, height=1024)
+plot(hist(data$date, breaks="quarters", labels=TRUE, xlab="Quarters",
+          axes=FALSE), xaxt="n")
+axis(1, data$date, format(data$date, "%Y"), cex.axis = 1.7)
+dev.off()
 """
 
 import logging

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list