Java Code Examples for org.jfree.data.xy.DefaultXYZDataset#removeSeries()
The following examples show how to use
org.jfree.data.xy.DefaultXYZDataset#removeSeries() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XYShapeRendererTest.java From openstock with GNU General Public License v3.0 | 5 votes |
/** * Check if finding the bounds in z-dimension of an XYZDataset works. */ public void testFindZBounds() { XYShapeRenderer r = new XYShapeRenderer(); assertNull(r.findZBounds(null)); DefaultXYZDataset dataset = new DefaultXYZDataset(); Range range; double data1[][] = { {1,1,1}, {1,1,1}, {1,2,3} }; dataset.addSeries("series1", data1); range = r.findZBounds(dataset); assertNotNull(range); assertEquals(1d, range.getLowerBound(), EPSILON); assertEquals(3d, range.getUpperBound(), EPSILON); double data2[][] = { {1,1,1}, {1,1,1}, {-1,-2,-3} }; dataset.removeSeries("series1"); dataset.addSeries("series2", data2); range = r.findZBounds(dataset); assertNotNull(range); assertEquals(-3d, range.getLowerBound(), EPSILON); assertEquals(-1d, range.getUpperBound(), EPSILON); double data3[][] = { {1,1,1}, {1,1,1}, {-1.2,2.9,3.8} }; dataset.removeSeries("series2"); dataset.addSeries("series3", data3); range = r.findZBounds(dataset); assertNotNull(range); assertEquals(-1.2d, range.getLowerBound(), EPSILON); assertEquals(3.8d, range.getUpperBound(), EPSILON); }
Example 2
Source File: XYShapeRendererTest.java From ccu-historian with GNU General Public License v3.0 | 5 votes |
/** * Check if finding the bounds in z-dimension of an XYZDataset works. */ public void testFindZBounds() { XYShapeRenderer r = new XYShapeRenderer(); assertNull(r.findZBounds(null)); DefaultXYZDataset dataset = new DefaultXYZDataset(); Range range; double data1[][] = { {1,1,1}, {1,1,1}, {1,2,3} }; dataset.addSeries("series1", data1); range = r.findZBounds(dataset); assertNotNull(range); assertEquals(1d, range.getLowerBound(), EPSILON); assertEquals(3d, range.getUpperBound(), EPSILON); double data2[][] = { {1,1,1}, {1,1,1}, {-1,-2,-3} }; dataset.removeSeries("series1"); dataset.addSeries("series2", data2); range = r.findZBounds(dataset); assertNotNull(range); assertEquals(-3d, range.getLowerBound(), EPSILON); assertEquals(-1d, range.getUpperBound(), EPSILON); double data3[][] = { {1,1,1}, {1,1,1}, {-1.2,2.9,3.8} }; dataset.removeSeries("series2"); dataset.addSeries("series3", data3); range = r.findZBounds(dataset); assertNotNull(range); assertEquals(-1.2d, range.getLowerBound(), EPSILON); assertEquals(3.8d, range.getUpperBound(), EPSILON); }
Example 3
Source File: XYShapeRendererTest.java From SIMVA-SoS with Apache License 2.0 | 5 votes |
/** * Check if finding the bounds in z-dimension of an XYZDataset works. */ public void testFindZBounds() { XYShapeRenderer r = new XYShapeRenderer(); assertNull(r.findZBounds(null)); DefaultXYZDataset dataset = new DefaultXYZDataset(); Range range; double data1[][] = { {1,1,1}, {1,1,1}, {1,2,3} }; dataset.addSeries("series1", data1); range = r.findZBounds(dataset); assertNotNull(range); assertEquals(1d, range.getLowerBound(), EPSILON); assertEquals(3d, range.getUpperBound(), EPSILON); double data2[][] = { {1,1,1}, {1,1,1}, {-1,-2,-3} }; dataset.removeSeries("series1"); dataset.addSeries("series2", data2); range = r.findZBounds(dataset); assertNotNull(range); assertEquals(-3d, range.getLowerBound(), EPSILON); assertEquals(-1d, range.getUpperBound(), EPSILON); double data3[][] = { {1,1,1}, {1,1,1}, {-1.2,2.9,3.8} }; dataset.removeSeries("series2"); dataset.addSeries("series3", data3); range = r.findZBounds(dataset); assertNotNull(range); assertEquals(-1.2d, range.getLowerBound(), EPSILON); assertEquals(3.8d, range.getUpperBound(), EPSILON); }
Example 4
Source File: XYShapeRendererTest.java From ECG-Viewer with GNU General Public License v2.0 | 5 votes |
/** * Check if finding the bounds in z-dimension of an XYZDataset works. */ public void testFindZBounds() { XYShapeRenderer r = new XYShapeRenderer(); assertNull(r.findZBounds(null)); DefaultXYZDataset dataset = new DefaultXYZDataset(); Range range; double data1[][] = { {1,1,1}, {1,1,1}, {1,2,3} }; dataset.addSeries("series1", data1); range = r.findZBounds(dataset); assertNotNull(range); assertEquals(1d, range.getLowerBound(), EPSILON); assertEquals(3d, range.getUpperBound(), EPSILON); double data2[][] = { {1,1,1}, {1,1,1}, {-1,-2,-3} }; dataset.removeSeries("series1"); dataset.addSeries("series2", data2); range = r.findZBounds(dataset); assertNotNull(range); assertEquals(-3d, range.getLowerBound(), EPSILON); assertEquals(-1d, range.getUpperBound(), EPSILON); double data3[][] = { {1,1,1}, {1,1,1}, {-1.2,2.9,3.8} }; dataset.removeSeries("series2"); dataset.addSeries("series3", data3); range = r.findZBounds(dataset); assertNotNull(range); assertEquals(-1.2d, range.getLowerBound(), EPSILON); assertEquals(3.8d, range.getUpperBound(), EPSILON); }
Example 5
Source File: XYShapeRendererTest.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * Check if finding the bounds in z-dimension of an XYZDataset works. */ public void testFindZBounds() { XYShapeRenderer r = new XYShapeRenderer(); assertNull(r.findZBounds(null)); DefaultXYZDataset dataset = new DefaultXYZDataset(); Range range; double data1[][] = { {1,1,1}, {1,1,1}, {1,2,3} }; dataset.addSeries("series1", data1); range = r.findZBounds(dataset); assertNotNull(range); assertEquals(1d, range.getLowerBound(), EPSILON); assertEquals(3d, range.getUpperBound(), EPSILON); double data2[][] = { {1,1,1}, {1,1,1}, {-1,-2,-3} }; dataset.removeSeries("series1"); dataset.addSeries("series2", data2); range = r.findZBounds(dataset); assertNotNull(range); assertEquals(-3d, range.getLowerBound(), EPSILON); assertEquals(-1d, range.getUpperBound(), EPSILON); double data3[][] = { {1,1,1}, {1,1,1}, {-1.2,2.9,3.8} }; dataset.removeSeries("series2"); dataset.addSeries("series3", data3); range = r.findZBounds(dataset); assertNotNull(range); assertEquals(-1.2d, range.getLowerBound(), EPSILON); assertEquals(3.8d, range.getUpperBound(), EPSILON); }