[Swift-commit] r4012 - in usertools/plotter: . src
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Thu Jan 20 10:07:44 CST 2011
Author: wozniak
Date: 2011-01-20 10:07:44 -0600 (Thu, 20 Jan 2011)
New Revision: 4012
Modified:
usertools/plotter/lines.zsh
usertools/plotter/src/LineReader.java
usertools/plotter/src/Lines.java
Log:
Usage notes
Modified: usertools/plotter/lines.zsh
===================================================================
--- usertools/plotter/lines.zsh 2011-01-20 15:58:33 UTC (rev 4011)
+++ usertools/plotter/lines.zsh 2011-01-20 16:07:44 UTC (rev 4012)
@@ -1,7 +1,7 @@
#!/bin/zsh
# LINES.ZSH
-# Arguments passed directly to Lines.java
+# Arguments passed directly to Lines.java - see there for details
# usage: lines.zsh <properties> <output file> <data file>*
PLOTTERS=$( dirname $0 )
Modified: usertools/plotter/src/LineReader.java
===================================================================
--- usertools/plotter/src/LineReader.java 2011-01-20 15:58:33 UTC (rev 4011)
+++ usertools/plotter/src/LineReader.java 2011-01-20 16:07:44 UTC (rev 4012)
@@ -1,6 +1,12 @@
import java.util.*;
+/**
+ * Utility to read a file into a List of String lines.
+ *
+ * Omits comments with #
+ * Wraps lines that end on backslash
+ * */
public class LineReader
{
LineReader()
@@ -78,7 +84,10 @@
result = t.length;
return result;
}
-
+
+ /**
+ Take line-oriented data and produce an array of doubles.
+ */
public static double[][] array(List<String> lines)
{
List<String[]> tokens = tokens(lines);
Modified: usertools/plotter/src/Lines.java
===================================================================
--- usertools/plotter/src/Lines.java 2011-01-20 15:58:33 UTC (rev 4011)
+++ usertools/plotter/src/Lines.java 2011-01-20 16:07:44 UTC (rev 4012)
@@ -20,6 +20,9 @@
import org.jfree.data.general.Series;
import org.jfree.data.xy.XYSeriesCollection;
+/**
+ * See main() for command-line arguments
+ * */
public class Lines
{
static Properties properties;
@@ -145,18 +148,12 @@
if (ymin != null) aymin = ymin;
if (ymax != null) aymax = ymax;
axis.setRange(aymin, aymax);
- }
+ }
}
/**
- Debugging only.
Args: Lines <properties> <output file> <data file>*
- Reads title, xlabel, ylabel, and legend labels from properties:
- e.g.:
- title = Plot
- xlabel = size
- ylabel = speed
- label.file.data = legend text
+ Reads settings from properties: see scanProperties()
*/
public static void main(String[] args)
{
@@ -251,6 +248,23 @@
}
}
+ /**
+ Various plot properties. All are currently optional
+
+ Example.
+ Assume you want to plot a two-column table in file.data.
+ The first column is the x values and the second column
+ is the y values. See LineReader for details.
+
+ Your properties may include:
+ title = Plot
+ xlabel = size
+ ylabel = speed
+ label.file.data = legend text
+ width (output image width)
+ height (output image height)
+ xmin, xmax, ymin, ymax (auto-selected if not given)
+ */
static void scanProperties()
{
String tmp;
More information about the Swift-commit
mailing list