changeset 150:e65bdec6470e

Add plotSeries, switch to jline2
author Chris Cannam
date Mon, 29 Apr 2013 17:24:54 +0100
parents 145431ff5ee3
children d5a5a0d7ce30
files .hgsubstate bin/yetilab yetilab/plot/plot.yeti
diffstat 3 files changed, 27 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/.hgsubstate	Sun Apr 28 10:42:45 2013 +0100
+++ b/.hgsubstate	Mon Apr 29 17:24:54 2013 +0100
@@ -1,1 +1,1 @@
-423dfec8262cd97b03e3137bcb05729f86cab6de ext
+fd27044461bb066480dc115c71b522528583d116 ext
--- a/bin/yetilab	Sun Apr 28 10:42:45 2013 +0100
+++ b/bin/yetilab	Mon Apr 29 17:24:54 2013 +0100
@@ -30,7 +30,7 @@
 JVAMP_DIR=${JVAMP_DIR:=$YLDIR/../jvamp}
 YERTLE_DIR=${YERTLE_DIR:=$YLDIR/../yertle}
 
-CLASSPATH=$YLDIR/yetilab.jar:$AYR_DIR/ayr.jar:$AYR_DIR/libreadline-java.jar:$YETI_LIBDIR/yeti.jar:$YETI_LIBDIR/yeti-lib.jar:$JVAMP_DIR/jvamp.jar:$YERTLE_DIR/yertle.jar:$JARDIR/jtransforms-2.4.jar:$JARDIR/org.jzy3d-0.9.jar:$JARDIR/jogl-all.jar:$JARDIR/gluegen.jar:$JARDIR/gluegen-rt.jar:$JARDIR/misc/opencsv-2.1.jar:$JARDIR/misc/org.convexhull.jar:$JARDIR/misc/swt.jar
+CLASSPATH=$YLDIR/yetilab.jar:$AYR_DIR/ayr.jar:$YETI_LIBDIR/yeti.jar:$YETI_LIBDIR/yeti-lib.jar:$JARDIR/jline-2.11-SNAPSHOT.jar:$JVAMP_DIR/jvamp.jar:$YERTLE_DIR/yertle.jar:$JARDIR/jtransforms-2.4.jar:$JARDIR/org.jzy3d-0.9.jar:$JARDIR/jogl-all.jar:$JARDIR/gluegen.jar:$JARDIR/gluegen-rt.jar:$JARDIR/opencsv-2.1.jar:$JARDIR/org.convexhull.jar:
 
 YETI_MODULE_SOURCE_PATH=${YETI_LIBDIR}/modules \
     LD_LIBRARY_PATH=$AYR_DIR:$JVAMP_DIR:$SODIR:$LD_LIBRARY_PATH \
--- a/yetilab/plot/plot.yeti	Sun Apr 28 10:42:45 2013 +0100
+++ b/yetilab/plot/plot.yeti	Mon Apr 29 17:24:54 2013 +0100
@@ -75,12 +75,37 @@
     ChartLauncher#openChart(chart);
     ());
 
+plotSeries series =
+   (chart = new Chart(Quality#Nicest);
+    scene = chart#getScene();
+    xx = [0..length series - 1];
+    yy = list series;
+    line = new FlatLine2d(xx as ~float[], yy as ~float[], 0);
+    line#setWireframeDisplayed(true);
+    line#setWireframeColor(Color#BLACK);
+    line#setWireframeWidth(2);
+    line#setFaceDisplayed(false);
+    scene#add(line);
+    chart#getView()#setViewPoint(new Coord3d(0, 0, 0));
+/*
+    axes = chart#getAxeLayout();
+    axes#setXAxeLabelDisplayed(false);
+    axes#setYAxeLabelDisplayed(false);
+    axes#setZAxeLabelDisplayed(true);
+    axes#setZAxeLabel("unit goes here"); //!!!
+    axes#setYTickLabelDisplayed(false);
+*/
+    ChartLauncher#openChart(chart);
+    ());
+
 plotStructure structure =
     case structure of
     Grid matrix:
         plotMatrix matrix;
     Curve curve:
         plotCurve curve;
+    Series series:
+        plotSeries series;
     _: failWith "Cannot plot this structure (only grids implemented so far)";
     esac;