13 public Plot(String filename, boolean percent) {
18 public Plot(String filename) {
20 command=new PrintWriter(new FileOutputStream(filename+".cmd"), true);
21 } catch (IOException e) {
25 this.filename=filename;
26 series=new Hashtable();
29 public Series getSeries(String name) {
30 if (series.containsKey(name))
31 return (Series)series.get(name);
32 Series s=createSeries(name);
37 private Series createSeries(String name) {
40 s=new Series(new PrintWriter(new FileOutputStream(filename+"."+count),true));
41 } catch (IOException e) {
45 if (!first) cmdstr+=",";
47 cmdstr+="\""+filename+"."+count+"\" title \""+name+"\"";
53 for(Iterator it=series.values().iterator();it.hasNext();) {
54 Series s=(Series)it.next();
57 command.println("set style data linespoints");
58 command.println("set terminal postscript enhanced eps \"Times-Roman\" 18");
59 command.println("set key left");
60 command.println("set output \""+filename+"linear.eps\"");
61 command.println(cmdstr);
63 command.println("set log y");
64 command.println("set output \""+filename+"log.eps\"");
65 command.println(cmdstr);