()
| 2535 | } |
| 2536 | |
| 2537 | double newPlot() { |
| 2538 | String title = getFirstString(); |
| 2539 | String xLabel = getNextString(); |
| 2540 | String yLabel = getNextString(); |
| 2541 | double[] x, y; |
| 2542 | if (interp.nextToken()==')') |
| 2543 | x = y = null; |
| 2544 | else { |
| 2545 | x = getNextArray(); |
| 2546 | if (interp.nextToken()==')') { |
| 2547 | y = x; |
| 2548 | x = new double[y.length]; |
| 2549 | for (int i=0; i<y.length; i++) |
| 2550 | x[i] = i; |
| 2551 | } else |
| 2552 | y = getNextArray(); |
| 2553 | } |
| 2554 | interp.getRightParen(); |
| 2555 | plot = new Plot(title, xLabel, yLabel, x, y); |
| 2556 | return Double.NaN; |
| 2557 | } |
| 2558 | |
| 2559 | double showPlot() { |
| 2560 | if (plot!=null) { |
no test coverage detected