Author: kozo
Date: 2009-12-23 17:40:41 -0800 (Wed, 23 Dec 2009)
New Revision: 18803
Added:
csplugins/trunk/soc/kozo/sample-data/processing/
csplugins/trunk/soc/kozo/sample-data/processing/bargraph/
csplugins/trunk/soc/kozo/sample-data/processing/bargraph/bargraph.pde
csplugins/trunk/soc/kozo/sample-data/processing/bargraph/data/
csplugins/trunk/soc/kozo/sample-data/processing/bargraph/data/bargraph.txt
Log:
added sample processing script
Added: csplugins/trunk/soc/kozo/sample-data/processing/bargraph/bargraph.pde
===================================================================
--- csplugins/trunk/soc/kozo/sample-data/processing/bargraph/bargraph.pde
(rev 0)
+++ csplugins/trunk/soc/kozo/sample-data/processing/bargraph/bargraph.pde
2009-12-24 01:40:41 UTC (rev 18803)
@@ -0,0 +1,22 @@
+float[] data;
+
+void setup(){
+ size(200,200);
+ String[] stuff = loadStrings("bargraph.txt");
+ data = float(split(stuff[0],','));
+}
+
+void draw(){
+ background(255);
+ stroke(255);
+
+ float sep = 200/data.length;
+ float maxval = max(data);
+ float unit = 200/maxval;
+ for (int i=0; i<data.length; i++){
+ fill(0);
+ rect(i*sep,200-data[i]*unit,sep,data[i]*unit);
+ }
+}
+
+
Added:
csplugins/trunk/soc/kozo/sample-data/processing/bargraph/data/bargraph.txt
===================================================================
--- csplugins/trunk/soc/kozo/sample-data/processing/bargraph/data/bargraph.txt
(rev 0)
+++ csplugins/trunk/soc/kozo/sample-data/processing/bargraph/data/bargraph.txt
2009-12-24 01:40:41 UTC (rev 18803)
@@ -0,0 +1 @@
+1,2,3,4,5
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.