SSJ
V. labo.

umontreal.iro.lecuyer.charts
Class PlotFormat

java.lang.Object
  extended by umontreal.iro.lecuyer.charts.PlotFormat

public class PlotFormat
extends Object

PlotFormat

Provide tools to import and export data set tables to and from Gnuplot, MATLAB and Mathematica compatible formats, or customized format.


Method Summary
static double[][] fromCSV(String data)
          .
static double[][] fromCustomizedFormat(String betweenValues, String endLine, String data)
          .
static double[][] fromGNUPlot(String data)
          .
static String toCSV(double[]... data)
          .
static String toCSV(XYSeriesCollection data)
          .
static String toCustomizedFormat(String heading, String footer, String betweenValues, String endLine, int precision, double[]... data)
          .
static String toCustomizedFormat(String heading, String footer, String betweenValues, String endLine, int precision, XYSeriesCollection data)
          .
static String toGNUPlot(double[]... data)
          .
static String toGNUPlot(XYSeriesCollection data)
          .
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

fromGNUPlot

public static double[][] fromGNUPlot(String data)
. \begin{tabb}
 Parses \texttt{data} according to the standard GNUPlot format and ...
 .... Deleting comments inside the input
 \texttt{String} is recommended.
 \end{tabb}
dataString to parse. Table that represent data contained in data. IllegalArgumentExceptionif each line of the input String doesn't share the same number of values


fromCSV

public static double[][] fromCSV(String data)
. \begin{tabb}
 Parses \texttt{data} according to the standard CSV format
 and stores the extracted values in the returned table.
 \end{tabb}
dataString to parse. Table that represent data contained in data. IllegalArgumentExceptionif each line of the input String doesn't share the same number of values


fromCustomizedFormat

public static double[][] fromCustomizedFormat(String betweenValues,
                                              String endLine,
                                              String data)
. \begin{tabb}
 Parses \texttt{data} according to a user defined format and stores...
 ...I, specially in the class
 \class{Pattern} (package java.util.regex).
 \end{tabb}

 
betweenValuesString which separates values on the same line. endLineString which separates lines. dataString to parse. Table that represent data contained in data. IllegalArgumentExceptionif each line of the input String doesn't share the same number of values


toGNUPlot

public static String toGNUPlot(double[]... data)
. \begin{tabb}
 Stores data tables \texttt{data} into a \texttt{String},
 with format understandable by GNUPlot.
 \end{tabb}
datadata tables. String that represent data tables in GNUPlot format.


toGNUPlot

public static String toGNUPlot(XYSeriesCollection data)
. \begin{tabb}
 Stores series collection \texttt{data} into a \texttt{String},
 with format understandable by GNUPlot.
 \end{tabb}
datadata tables. String that represent data tables in GNUPlot format.


toCSV

public static String toCSV(double[]... data)
. \begin{tabb}
 Stores data tables \texttt{data} into a \texttt{String}
 with form...
 ...
 or into MATLAB with MATLAB's function \texttt{csvread('fileName')}.
 \end{tabb}
datadata tables. String that represent data tables in CSV format.


toCSV

public static String toCSV(XYSeriesCollection data)
. \begin{tabb}
 Stores series collection \texttt{data} into a \texttt{String}
 with format CSV (comma-separated value tabular data).
 \end{tabb}
datadata tables. String that represent data tables in CSV format.


toCustomizedFormat

public static String toCustomizedFormat(String heading,
                                        String footer,
                                        String betweenValues,
                                        String endLine,
                                        int precision,
                                        double[]... data)
. \begin{tabb}
 Stores data tables \texttt{data} into a \texttt{String} with custom...
 ...ly, this parameter contains the classic end of line
 character \lq \%n'.
 \end{tabb}
headinghead of the returned String. footerend of the returned String. betweenValuesString which separates values on the same line. endLineString which separates lines. datadata tables. String that represent data tables in customized format.


toCustomizedFormat

public static String toCustomizedFormat(String heading,
                                        String footer,
                                        String betweenValues,
                                        String endLine,
                                        int precision,
                                        XYSeriesCollection data)
. \begin{tabb}
 Stores data tables \texttt{data} into a \texttt{String}
 with customized format from an \texttt{XYSeriesCollection} variable.
 \end{tabb}
headinghead of the returned String. footerend of the returned String. betweenValuesString which separates values on the same line. endLineString which separates lines. datadata tables. String that represent data tables in customized format.


SSJ
V. labo.

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.