Fixed bugs on MatrixPlotArray 7 LinePlotArray

This commit is contained in:
2014-08-22 09:26:16 +02:00
parent fb5b2ff257
commit 1a294a1a75
2 changed files with 6 additions and 4 deletions

View File

@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>ch.psi</groupId>
<artifactId>fda</artifactId>
<version>2.4.4</version>
<version>2.4.5</version>
<dependencies>
@@ -94,7 +94,7 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>plot</artifactId>
<version>2.0-SNAPSHOT</version>
<version>2.1-SNAPSHOT</version>
</dependency>
</dependencies>

View File

@@ -35,6 +35,7 @@ import ch.psi.plot.MatrixPlot;
import ch.psi.plot.MatrixPlotBase;
import ch.psi.plot.MatrixPlotSeries;
import ch.psi.plot.Plot;
import ch.psi.plot.PlotSeries;
import com.google.common.eventbus.Subscribe;
import java.util.ArrayList;
import java.util.List;
@@ -211,7 +212,8 @@ public class Visualizer {
// Remove outdated series
if(((LinePlot)xyfilter.getPlot()).getNumberOfSeries()>xyfilter.getMaxSeries()){
// Remove oldest series
((LinePlot)xyfilter.getPlot()).removeSeries(((LinePlot)xyfilter.getPlot()).getSeries(0));
LinePlotSeries s = ((LinePlot)xyfilter.getPlot()).getSeries(0);
((LinePlot)xyfilter.getPlot()).removeSeries(s);
}
double[] data = message.getData(xyfilter.getIdY());
@@ -256,7 +258,7 @@ public class Visualizer {
// int size = xyzfilter.getSize();
// for(int i=offset;i<offset+size; i++){
for(int i=0;i<data.length; i++){
((MatrixPlot)xyzfilter).getSeries("").appendData(i, y, data[i]);
((MatrixPlot)xyzfilter.getPlot()).getSeries("").appendData(i, y, data[i]);
}
/*
// Update data if update by point is enabled