/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* This file is distributed subject to a Software License Agreement found
* in the file LICENSE that is included with this distribution.
\*************************************************************************/
//package SDDS.apps;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.lang.reflect.*;
import SDDS.java.SDDS.*;
import SDDS.java.SDDSplot.*;
/**
* This program is used to plot SDDS files.
* usage: java SDDS.apps.sddsplot [<source-file>]
* [-columnnames=xColumn,yColumn[,yColumn ...]
*
* @author Robert Soliday
*
* soliday@aps.anl.gov
* @version 1.0 (May 9, 2000)
* @since JDK 1.2
*/
public class sddsplot {
static void printUsage() {
String usage;
usage = "usage: java SDDS.apps.sddsplot []\n";
usage = usage + "[-columnnames=xColumn,yColumn[,yColumn ...]\n\n";
usage = usage + "This program is used to plot SDDS files.\n\n";
usage = usage + "Program by Robert Soliday.";
System.err.println(usage);
}
public static void main(String args[]) {
String xColumn=null;
String[] yColumns=null;
String inputfile = null;
double[] xData;
double[][] yData;
int rows = 0;
int ycount = 1;
TickInterval xticks;
TickInterval yticks;
String[][] commandLineArgs;
int arguments, elements, i, j, k;
commandLineArgs = SDDSUtil.parseCommandLine(args);
arguments = Array.getLength(commandLineArgs);
if (arguments==0) {
printUsage();
return;
}
for (i=0;i