Cleanups
This commit is contained in:
+32
-6
@@ -1,10 +1,36 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
|
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
||||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
|
<attributes>
|
||||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
|
<attribute name="optional" value="true"/>
|
||||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
|
</attributes>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
</classpathentry>
|
||||||
|
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
encoding//src/main/java=UTF-8
|
||||||
|
encoding//src/test/java=UTF-8
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
#Tue Oct 18 15:36:07 CEST 2011
|
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||||
|
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.source=1.7
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# Overview
|
||||||
|
|
||||||
|
# Notes
|
||||||
|
JFree is not thread safe!
|
||||||
|
|
||||||
|
While data is modified while JFree is rendering the plot there will be an runtime exception.
|
||||||
|
|
||||||
|
E.g. if you define an array of hundred points to be plotted by JFree and for some reason
|
||||||
|
you decide to remove (or alter) these points, then the rendering thread tries to finish rendering the 100
|
||||||
|
points it started with but allows the concurrent modification of the data. This causes a runtime
|
||||||
|
ArrayIndexOutOfBounds or similar Runtime Exception in the worst case or at least give a 'noisy' impression of the plotting.
|
||||||
|
However, the problem occurs only for large datasets and/or high update frequencies.
|
||||||
@@ -1 +0,0 @@
|
|||||||
JFree is not thread safe. If a manipulate the plotting data used by JFree, the rendering process is not synchronized in the sense that it does not lock the data and hence does not finish plotting the data it started with. If you e.g. define a array of hundred points to be plotted by JFree and for some reason you decide to remove (or alter) these points, then the rendering thread tries to finish rendering the 100 points it started with but allows the concurrent modification of the data. This can cause a runtime Array Index Out of Bounds Exception in the worst case or at least give a 'noisy' impression of the plotting. However, the problem occurs only for large datasets and/or high update frequencies.
|
|
||||||
+11
-3
@@ -2,13 +2,13 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>ch.psi</groupId>
|
<groupId>ch.psi</groupId>
|
||||||
<artifactId>plot</artifactId>
|
<artifactId>plot</artifactId>
|
||||||
<version>1.1.30</version>
|
<version>1.1.31</version>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jfree</groupId>
|
<groupId>org.jfree</groupId>
|
||||||
<artifactId>chart</artifactId>
|
<artifactId>jfreechart</artifactId>
|
||||||
<version>1.0.13</version>
|
<version>1.0.15</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
@@ -20,6 +20,14 @@
|
|||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<source>1.7</source>
|
||||||
|
<target>1.7</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
<!-- Generate Javadoc Jar -->
|
<!-- Generate Javadoc Jar -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
|||||||
@@ -22,10 +22,6 @@ package ch.psi.plot;
|
|||||||
import org.jfree.chart.ChartPanel;
|
import org.jfree.chart.ChartPanel;
|
||||||
import org.jfree.chart.JFreeChart;
|
import org.jfree.chart.JFreeChart;
|
||||||
|
|
||||||
/**
|
|
||||||
* @author ebner
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface Plot {
|
public interface Plot {
|
||||||
/**
|
/**
|
||||||
* Get the chart panel
|
* Get the chart panel
|
||||||
|
|||||||
@@ -50,8 +50,6 @@ import ch.psi.plot.xy.tools.Minimum;
|
|||||||
|
|
||||||
public class LinePlot implements Plot {
|
public class LinePlot implements Plot {
|
||||||
|
|
||||||
|
|
||||||
// Get Logger
|
|
||||||
private static final Logger logger = Logger.getLogger(LinePlot.class.getName());
|
private static final Logger logger = Logger.getLogger(LinePlot.class.getName());
|
||||||
|
|
||||||
private ChartPanel chartPanel;
|
private ChartPanel chartPanel;
|
||||||
@@ -77,7 +75,6 @@ public class LinePlot implements Plot {
|
|||||||
private boolean tooltips = false;
|
private boolean tooltips = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
|
||||||
* @param title Title of plot
|
* @param title Title of plot
|
||||||
*/
|
*/
|
||||||
public LinePlot(String title){
|
public LinePlot(String title){
|
||||||
@@ -86,7 +83,6 @@ public class LinePlot implements Plot {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
|
||||||
* @param title Title of plot
|
* @param title Title of plot
|
||||||
* @param data Data of plot
|
* @param data Data of plot
|
||||||
*/
|
*/
|
||||||
@@ -222,7 +218,7 @@ public class LinePlot implements Plot {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add additional items to the context menu of the frame
|
* Add additional items to the context menu of the plot
|
||||||
*/
|
*/
|
||||||
public void amendContextMenu(){
|
public void amendContextMenu(){
|
||||||
|
|
||||||
@@ -231,7 +227,7 @@ public class LinePlot implements Plot {
|
|||||||
JMenu toolsMenu = new JMenu("Tools");
|
JMenu toolsMenu = new JMenu("Tools");
|
||||||
chartPanel.getPopupMenu().add(toolsMenu);
|
chartPanel.getPopupMenu().add(toolsMenu);
|
||||||
|
|
||||||
// Manipulation function
|
// Mark average
|
||||||
JMenuItem averageMenuItem = new JMenuItem("Average");
|
JMenuItem averageMenuItem = new JMenuItem("Average");
|
||||||
averageMenuItem.addActionListener(new ActionListener() {
|
averageMenuItem.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -239,8 +235,6 @@ public class LinePlot implements Plot {
|
|||||||
Average average = new Average();
|
Average average = new Average();
|
||||||
for (XYSeriesP series : data.getSeries()) {
|
for (XYSeriesP series : data.getSeries()) {
|
||||||
double a = average.average(series);
|
double a = average.average(series);
|
||||||
// System.out.println("Average: "+a);
|
|
||||||
|
|
||||||
// Remove all range markers
|
// Remove all range markers
|
||||||
Collection<?> c = chartPanel.getChart().getXYPlot().getRangeMarkers(Layer.FOREGROUND);
|
Collection<?> c = chartPanel.getChart().getXYPlot().getRangeMarkers(Layer.FOREGROUND);
|
||||||
if(c!=null){
|
if(c!=null){
|
||||||
@@ -269,9 +263,10 @@ public class LinePlot implements Plot {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// chartPanel.getPopupMenu().add(averageMenuItem);
|
|
||||||
toolsMenu.add(averageMenuItem);
|
toolsMenu.add(averageMenuItem);
|
||||||
|
|
||||||
|
|
||||||
|
// Mark minimum value
|
||||||
JMenuItem minimumMenuItem = new JMenuItem("Minimum");
|
JMenuItem minimumMenuItem = new JMenuItem("Minimum");
|
||||||
minimumMenuItem.addActionListener(new ActionListener() {
|
minimumMenuItem.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -290,10 +285,10 @@ public class LinePlot implements Plot {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// chartPanel.getPopupMenu().add(minimumMenuItem);
|
|
||||||
toolsMenu.add(minimumMenuItem);
|
toolsMenu.add(minimumMenuItem);
|
||||||
|
|
||||||
|
|
||||||
|
// Mark maximum value
|
||||||
JMenuItem maximumMenuItem = new JMenuItem("Maximum");
|
JMenuItem maximumMenuItem = new JMenuItem("Maximum");
|
||||||
maximumMenuItem.addActionListener(new ActionListener() {
|
maximumMenuItem.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -301,7 +296,6 @@ public class LinePlot implements Plot {
|
|||||||
Maximum maximum = new Maximum();
|
Maximum maximum = new Maximum();
|
||||||
for (XYSeriesP series : data.getSeries()) {
|
for (XYSeriesP series : data.getSeries()) {
|
||||||
XYDataItem m = maximum.maximum(series);
|
XYDataItem m = maximum.maximum(series);
|
||||||
// System.out.println("Maximum: "+m.getXValue());
|
|
||||||
// Remove all annotation for the series
|
// Remove all annotation for the series
|
||||||
for(Object o: chartPanel.getChart().getXYPlot().getAnnotations()){
|
for(Object o: chartPanel.getChart().getXYPlot().getAnnotations()){
|
||||||
chartPanel.getChart().getXYPlot().removeAnnotation((XYAnnotation) o);
|
chartPanel.getChart().getXYPlot().removeAnnotation((XYAnnotation) o);
|
||||||
@@ -312,26 +306,15 @@ public class LinePlot implements Plot {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// chartPanel.getPopupMenu().add(maximumMenuItem);
|
|
||||||
toolsMenu.add(maximumMenuItem);
|
toolsMenu.add(maximumMenuItem);
|
||||||
|
|
||||||
|
|
||||||
|
// Show derivative
|
||||||
JMenuItem derivativeMenuItem = new JMenuItem("Derivative");
|
JMenuItem derivativeMenuItem = new JMenuItem("Derivative");
|
||||||
derivativeMenuItem.addActionListener(new ActionListener() {
|
derivativeMenuItem.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
Derivative derivative = new Derivative();
|
Derivative derivative = new Derivative();
|
||||||
// for (XYSeriesP series : data.getSeries()) {
|
|
||||||
// // Show derivative in same plot
|
|
||||||
// final XYSeriesP s = derivative.derivative(series);
|
|
||||||
// SwingUtilities.invokeLater(new Runnable() { // Avoid concurrent modification exception
|
|
||||||
// @Override
|
|
||||||
// public void run() {
|
|
||||||
// data.addSeries(s); // Add Derivative
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Show new frame
|
|
||||||
LinePlot p = new LinePlot("Derivative - " + title, derivative.derivative(data));
|
LinePlot p = new LinePlot("Derivative - " + title, derivative.derivative(data));
|
||||||
|
|
||||||
JFrame frame = new JFrame();
|
JFrame frame = new JFrame();
|
||||||
@@ -341,9 +324,9 @@ public class LinePlot implements Plot {
|
|||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// chartPanel.getPopupMenu().add(derivativeMenuItem);
|
|
||||||
toolsMenu.add(derivativeMenuItem);
|
toolsMenu.add(derivativeMenuItem);
|
||||||
|
|
||||||
|
// Show integral
|
||||||
JMenuItem integralMenuItem = new JMenuItem("Integral");
|
JMenuItem integralMenuItem = new JMenuItem("Integral");
|
||||||
integralMenuItem.addActionListener(new ActionListener() {
|
integralMenuItem.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -360,37 +343,10 @@ public class LinePlot implements Plot {
|
|||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// chartPanel.getPopupMenu().add(integralMenuItem);
|
|
||||||
toolsMenu.add(integralMenuItem);
|
toolsMenu.add(integralMenuItem);
|
||||||
|
|
||||||
chartPanel.getPopupMenu().addSeparator();
|
chartPanel.getPopupMenu().addSeparator();
|
||||||
|
|
||||||
// // Plot all series of the plot in a own plot
|
|
||||||
// JMenuItem splitPlotMenuItem = new JMenuItem("Split");
|
|
||||||
// splitPlotMenuItem.addActionListener(new ActionListener() {
|
|
||||||
// @Override
|
|
||||||
// public void actionPerformed(ActionEvent e) {
|
|
||||||
// for (XYSeriesP serie : data.getSeries()) {
|
|
||||||
// XYSeriesCollectionP collection = new XYSeriesCollectionP();
|
|
||||||
// collection.addSeries(serie);
|
|
||||||
//
|
|
||||||
// int index = data.indexOf(serie);
|
|
||||||
// //The right colors are not automatically assigned
|
|
||||||
// Paint paint = chart.getXYPlot().getRenderer().getSeriesPaint(index);
|
|
||||||
// LinePlot p = new LinePlot((String) serie.getKey(), collection);
|
|
||||||
// // there is only one series in this plot, so we choose index 0 to assign paint
|
|
||||||
// p.getChartPanel().getChart().getXYPlot().getRenderer().setSeriesPaint(0, paint);
|
|
||||||
//
|
|
||||||
// JFrame frame = new JFrame();
|
|
||||||
// frame.setContentPane(p.getChartPanel());
|
|
||||||
// frame.pack();
|
|
||||||
// RefineryUtilities.centerFrameOnScreen(frame);
|
|
||||||
// frame.setVisible(true);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// chartPanel.getPopupMenu().add(splitPlotMenuItem);
|
|
||||||
|
|
||||||
// Detach plot into a separate frame
|
// Detach plot into a separate frame
|
||||||
JMenuItem detachPlotMenuItem = new JMenuItem("Detach");
|
JMenuItem detachPlotMenuItem = new JMenuItem("Detach");
|
||||||
detachPlotMenuItem.addActionListener(new ActionListener() {
|
detachPlotMenuItem.addActionListener(new ActionListener() {
|
||||||
@@ -454,9 +410,6 @@ public class LinePlot implements Plot {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Show tooltips
|
|
||||||
*/
|
|
||||||
private void showTooltips(){
|
private void showTooltips(){
|
||||||
tooltips = true;
|
tooltips = true;
|
||||||
DecimalFormat dm = new DecimalFormat("0.##########");
|
DecimalFormat dm = new DecimalFormat("0.##########");
|
||||||
@@ -466,9 +419,6 @@ public class LinePlot implements Plot {
|
|||||||
chartPanel.getChartRenderingInfo().setEntityCollection(new StandardEntityCollection());
|
chartPanel.getChartRenderingInfo().setEntityCollection(new StandardEntityCollection());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Hide tooltips
|
|
||||||
*/
|
|
||||||
private void hideTooltips(){
|
private void hideTooltips(){
|
||||||
tooltips = false;
|
tooltips = false;
|
||||||
// http://www.jfree.org/phpBB2/viewtopic.php?t=12788&highlight=redraw+speed+performance+problem
|
// http://www.jfree.org/phpBB2/viewtopic.php?t=12788&highlight=redraw+speed+performance+problem
|
||||||
@@ -477,13 +427,8 @@ public class LinePlot implements Plot {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see ch.psi.plot.Plot#update()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void update() {
|
public void update() {
|
||||||
// Fire chart change event
|
|
||||||
// chart.fireChartChanged();
|
|
||||||
if(data != null){
|
if(data != null){
|
||||||
SwingUtilities.invokeLater(new Runnable() { // Try to avoid concurrent modification exception
|
SwingUtilities.invokeLater(new Runnable() { // Try to avoid concurrent modification exception
|
||||||
@Override
|
@Override
|
||||||
@@ -502,48 +447,26 @@ public class LinePlot implements Plot {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see ch.psi.plot.Plot#getChart()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public JFreeChart getChart() {
|
public JFreeChart getChart() {
|
||||||
return chart;
|
return chart;
|
||||||
}
|
}
|
||||||
|
|
||||||
//getter and setter
|
// Getter and setter
|
||||||
public XYSeriesCollectionP getData() {
|
public XYSeriesCollectionP getData() {
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the xAxisLabel
|
|
||||||
*/
|
|
||||||
public String getxAxisLabel() {
|
public String getxAxisLabel() {
|
||||||
return xAxisLabel;
|
return xAxisLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param xAxisLabel the xAxisLabel to set
|
|
||||||
*/
|
|
||||||
public void setxAxisLabel(String xAxisLabel) {
|
public void setxAxisLabel(String xAxisLabel) {
|
||||||
this.xAxisLabel = xAxisLabel;
|
this.xAxisLabel = xAxisLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the yAxisLabel
|
|
||||||
*/
|
|
||||||
public String getyAxisLabel() {
|
public String getyAxisLabel() {
|
||||||
return yAxisLabel;
|
return yAxisLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param yAxisLabel the yAxisLabel to set
|
|
||||||
*/
|
|
||||||
public void setyAxisLabel(String yAxisLabel) {
|
public void setyAxisLabel(String yAxisLabel) {
|
||||||
this.yAxisLabel = yAxisLabel;
|
this.yAxisLabel = yAxisLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,8 +26,7 @@ import ch.psi.plot.xy.XYSeriesP;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ebner
|
* Calculate average of series
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class Average {
|
public class Average {
|
||||||
|
|
||||||
|
|||||||
@@ -25,8 +25,7 @@ import ch.psi.plot.xy.XYSeriesCollectionP;
|
|||||||
import ch.psi.plot.xy.XYSeriesP;
|
import ch.psi.plot.xy.XYSeriesP;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ebner
|
* Calculate derivative of series
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class Derivative {
|
public class Derivative {
|
||||||
|
|
||||||
|
|||||||
@@ -25,8 +25,7 @@ import ch.psi.plot.xy.XYSeriesCollectionP;
|
|||||||
import ch.psi.plot.xy.XYSeriesP;
|
import ch.psi.plot.xy.XYSeriesP;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ebner
|
* Calculate integral of series
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class Integral {
|
public class Integral {
|
||||||
|
|
||||||
|
|||||||
@@ -23,8 +23,7 @@ import org.jfree.data.xy.XYDataItem;
|
|||||||
import ch.psi.plot.xy.XYSeriesP;
|
import ch.psi.plot.xy.XYSeriesP;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ebner
|
* Find maximum of series
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class Maximum {
|
public class Maximum {
|
||||||
|
|
||||||
|
|||||||
@@ -23,8 +23,7 @@ import org.jfree.data.xy.XYDataItem;
|
|||||||
import ch.psi.plot.xy.XYSeriesP;
|
import ch.psi.plot.xy.XYSeriesP;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ebner
|
* Find minimum of series
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class Minimum {
|
public class Minimum {
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,7 @@ package ch.psi.plot.xyz;
|
|||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ebner
|
* Utility class for applying a color map
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class ColorManager {
|
public class ColorManager {
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ import java.util.List;
|
|||||||
import org.jfree.chart.axis.NumberAxis;
|
import org.jfree.chart.axis.NumberAxis;
|
||||||
import org.jfree.chart.renderer.xy.XYBlockRenderer;
|
import org.jfree.chart.renderer.xy.XYBlockRenderer;
|
||||||
import org.jfree.data.DomainOrder;
|
import org.jfree.data.DomainOrder;
|
||||||
import org.jfree.data.general.DatasetChangeEvent;
|
|
||||||
import org.jfree.data.general.DatasetChangeListener;
|
import org.jfree.data.general.DatasetChangeListener;
|
||||||
import org.jfree.data.general.DatasetGroup;
|
import org.jfree.data.general.DatasetGroup;
|
||||||
import org.jfree.data.xy.XYZDataset;
|
import org.jfree.data.xy.XYZDataset;
|
||||||
@@ -32,15 +31,11 @@ import org.jfree.ui.RectangleAnchor;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Dynamic dataset
|
* Dynamic dataset
|
||||||
* @author ebner
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class DynamicXYZDataset implements XYZDataset{
|
public class DynamicXYZDataset implements XYZDataset{
|
||||||
|
|
||||||
private final double xResolution;
|
private final double xResolution;
|
||||||
private final double yResolution;
|
private final double yResolution;
|
||||||
private final double incX;
|
|
||||||
private final double incY;
|
|
||||||
|
|
||||||
private final NumberAxis xAxis = new NumberAxis();
|
private final NumberAxis xAxis = new NumberAxis();
|
||||||
private double xLowerBound = Double.NaN;
|
private double xLowerBound = Double.NaN;
|
||||||
@@ -56,7 +51,6 @@ public class DynamicXYZDataset implements XYZDataset{
|
|||||||
private final XYBlockRenderer renderer = new XYBlockRenderer();
|
private final XYBlockRenderer renderer = new XYBlockRenderer();
|
||||||
|
|
||||||
|
|
||||||
private final List<DatasetChangeListener> listeners = new ArrayList<DatasetChangeListener>();
|
|
||||||
private List<DynamicXYZDataset.Vector> items = new ArrayList<DynamicXYZDataset.Vector>();
|
private List<DynamicXYZDataset.Vector> items = new ArrayList<DynamicXYZDataset.Vector>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -65,8 +59,6 @@ public class DynamicXYZDataset implements XYZDataset{
|
|||||||
public DynamicXYZDataset(){
|
public DynamicXYZDataset(){
|
||||||
xResolution = 1.0;
|
xResolution = 1.0;
|
||||||
yResolution = 1.0;
|
yResolution = 1.0;
|
||||||
incX = xResolution/2;
|
|
||||||
incY = yResolution/2;
|
|
||||||
|
|
||||||
xAxis.setRange(xLowerBound, xUpperBound);
|
xAxis.setRange(xLowerBound, xUpperBound);
|
||||||
yAxis.setRange(yLowerBound, yUpperBound);
|
yAxis.setRange(yLowerBound, yUpperBound);
|
||||||
@@ -77,150 +69,56 @@ public class DynamicXYZDataset implements XYZDataset{
|
|||||||
renderer.setBaseCreateEntities(false);
|
renderer.setBaseCreateEntities(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Add datapoint
|
|
||||||
* @param x
|
|
||||||
* @param y
|
|
||||||
* @param z
|
|
||||||
*/
|
|
||||||
public void addData(double x, double y, double z){
|
public void addData(double x, double y, double z){
|
||||||
items.add(new DynamicXYZDataset.Vector(x,y,z));
|
items.add(new DynamicXYZDataset.Vector(x,y,z));
|
||||||
|
|
||||||
// Update axis
|
|
||||||
|
|
||||||
|
|
||||||
// if(Double.isNaN(xLowerBound) && Double.isNaN(xUpperBound)){
|
|
||||||
// xLowerBound = x-incX;
|
|
||||||
// xUpperBound = x+incX;
|
|
||||||
// xAxis.setRange(xLowerBound, xUpperBound);
|
|
||||||
// }
|
|
||||||
// else{
|
|
||||||
// if(x>(xUpperBound+incX)){
|
|
||||||
// xUpperBound = x+incX;
|
|
||||||
// xAxis.setUpperBound(xUpperBound);
|
|
||||||
// }
|
|
||||||
// else if(x<xLowerBound-incX){
|
|
||||||
// xLowerBound = x-incX;
|
|
||||||
// xAxis.setLowerBound(xLowerBound);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if(Double.isNaN(yLowerBound) && Double.isNaN(yUpperBound)){
|
|
||||||
// yLowerBound = y-incY;
|
|
||||||
// yUpperBound = y+incY;
|
|
||||||
// yAxis.setRange(yLowerBound, yUpperBound);
|
|
||||||
// }
|
|
||||||
// else{
|
|
||||||
// if(y>(yUpperBound+incY)){
|
|
||||||
// yUpperBound = y+incY;
|
|
||||||
// yAxis.setUpperBound(yUpperBound);
|
|
||||||
// }
|
|
||||||
// else if(y<yLowerBound-incY){
|
|
||||||
// yLowerBound = y-incY;
|
|
||||||
// yAxis.setLowerBound(yLowerBound);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if(Double.isNaN(zLowerBound) && Double.isNaN(zUpperBound)){
|
|
||||||
// zLowerBound = z;
|
|
||||||
// zUpperBound = z;
|
|
||||||
// }
|
|
||||||
// else{
|
|
||||||
// if(z>zUpperBound){
|
|
||||||
// zUpperBound = z;
|
|
||||||
// }
|
|
||||||
// else if(z<zLowerBound){
|
|
||||||
// zLowerBound = z;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Inform change listeners
|
|
||||||
// DatasetChangeEvent event = new DatasetChangeEvent(this, this);
|
|
||||||
// for(DatasetChangeListener l: listeners){
|
|
||||||
// l.datasetChanged(event );
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.jfree.data.xy.XYDataset#getItemCount(int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int getItemCount(int series) {
|
public int getItemCount(int series) {
|
||||||
return items.size();
|
return items.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.jfree.data.xy.XYDataset#getX(int, int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public Number getX(int series, int item) {
|
public Number getX(int series, int item) {
|
||||||
return items.get(item).getX();
|
return items.get(item).getX();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.jfree.data.xy.XYDataset#getXValue(int, int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public double getXValue(int series, int item) {
|
public double getXValue(int series, int item) {
|
||||||
return items.get(item).getX();
|
return items.get(item).getX();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.jfree.data.xy.XYDataset#getY(int, int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public Number getY(int series, int item) {
|
public Number getY(int series, int item) {
|
||||||
return items.get(item).getY();
|
return items.get(item).getY();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.jfree.data.xy.XYDataset#getYValue(int, int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public double getYValue(int series, int item) {
|
public double getYValue(int series, int item) {
|
||||||
return items.get(item).getY();
|
return items.get(item).getY();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.jfree.data.xy.XYZDataset#getZ(int, int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public Number getZ(int series, int item) {
|
public Number getZ(int series, int item) {
|
||||||
return items.get(item).getZ();
|
return items.get(item).getZ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.jfree.data.xy.XYZDataset#getZValue(int, int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public double getZValue(int series, int item) {
|
public double getZValue(int series, int item) {
|
||||||
return items.get(item).getZ();
|
return items.get(item).getZ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.jfree.data.xy.XYDataset#getDomainOrder()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public DomainOrder getDomainOrder() {
|
public DomainOrder getDomainOrder() {
|
||||||
return DomainOrder.NONE;
|
return DomainOrder.NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.jfree.data.general.SeriesDataset#getSeriesCount()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int getSeriesCount() {
|
public int getSeriesCount() {
|
||||||
// Series not implemented/used - dataset only holds one series
|
// Series not implemented/used - dataset only holds one series
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.jfree.data.general.SeriesDataset#getSeriesKey(int)
|
|
||||||
*/
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
@Override
|
@Override
|
||||||
public Comparable getSeriesKey(int series) {
|
public Comparable getSeriesKey(int series) {
|
||||||
@@ -228,9 +126,6 @@ public class DynamicXYZDataset implements XYZDataset{
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.jfree.data.general.SeriesDataset#indexOf(java.lang.Comparable)
|
|
||||||
*/
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
@Override
|
@Override
|
||||||
public int indexOf(Comparable seriesKey) {
|
public int indexOf(Comparable seriesKey) {
|
||||||
@@ -238,115 +133,56 @@ public class DynamicXYZDataset implements XYZDataset{
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.jfree.data.general.Dataset#getGroup()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public DatasetGroup getGroup() {
|
public DatasetGroup getGroup() {
|
||||||
// Not implemented/used
|
// Not implemented/used
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.jfree.data.general.Dataset#setGroup(org.jfree.data.general.DatasetGroup)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setGroup(DatasetGroup group) {
|
public void setGroup(DatasetGroup group) {
|
||||||
// Not implemented/used
|
// Not implemented/used
|
||||||
}
|
}
|
||||||
|
|
||||||
// Listener concept implementation
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.jfree.data.general.Dataset#addChangeListener(org.jfree.data.general.DatasetChangeListener)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void addChangeListener(DatasetChangeListener listener) {
|
public void addChangeListener(DatasetChangeListener listener) {
|
||||||
listeners.add(listener);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.jfree.data.general.Dataset#removeChangeListener(org.jfree.data.general.DatasetChangeListener)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void removeChangeListener(DatasetChangeListener listener) {
|
public void removeChangeListener(DatasetChangeListener listener) {
|
||||||
listeners.remove(listener);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Convenient methods
|
// Convenient methods
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the zLowerBound
|
|
||||||
*/
|
|
||||||
public double getzLowerBound() {
|
public double getzLowerBound() {
|
||||||
return zLowerBound;
|
return zLowerBound;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the zUpperBound
|
|
||||||
*/
|
|
||||||
public double getzUpperBound() {
|
public double getzUpperBound() {
|
||||||
return zUpperBound;
|
return zUpperBound;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the xAxis
|
|
||||||
*/
|
|
||||||
public NumberAxis getxAxis() {
|
public NumberAxis getxAxis() {
|
||||||
return xAxis;
|
return xAxis;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the yAxis
|
|
||||||
*/
|
|
||||||
public NumberAxis getyAxis() {
|
public NumberAxis getyAxis() {
|
||||||
return yAxis;
|
return yAxis;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the renderer
|
|
||||||
*/
|
|
||||||
public XYBlockRenderer getRenderer() {
|
public XYBlockRenderer getRenderer() {
|
||||||
return renderer;
|
return renderer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the xLowerBound
|
|
||||||
*/
|
|
||||||
public double getxLowerBound() {
|
public double getxLowerBound() {
|
||||||
return xLowerBound;
|
return xLowerBound;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the xUpperBound
|
|
||||||
*/
|
|
||||||
public double getxUpperBound() {
|
public double getxUpperBound() {
|
||||||
return xUpperBound;
|
return xUpperBound;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the yLowerBound
|
|
||||||
*/
|
|
||||||
public double getyLowerBound() {
|
public double getyLowerBound() {
|
||||||
return yLowerBound;
|
return yLowerBound;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the yUpperBound
|
|
||||||
*/
|
|
||||||
public double getyUpperBound() {
|
public double getyUpperBound() {
|
||||||
return yUpperBound;
|
return yUpperBound;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Vector{
|
class Vector{
|
||||||
private double x;
|
private double x;
|
||||||
private double y;
|
private double y;
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ import java.util.List;
|
|||||||
import org.jfree.chart.axis.NumberAxis;
|
import org.jfree.chart.axis.NumberAxis;
|
||||||
import org.jfree.chart.renderer.xy.XYBlockRenderer;
|
import org.jfree.chart.renderer.xy.XYBlockRenderer;
|
||||||
import org.jfree.data.DomainOrder;
|
import org.jfree.data.DomainOrder;
|
||||||
import org.jfree.data.general.DatasetChangeEvent;
|
|
||||||
import org.jfree.data.general.DatasetChangeListener;
|
import org.jfree.data.general.DatasetChangeListener;
|
||||||
import org.jfree.data.general.DatasetGroup;
|
import org.jfree.data.general.DatasetGroup;
|
||||||
import org.jfree.data.xy.XYZDataset;
|
import org.jfree.data.xy.XYZDataset;
|
||||||
@@ -39,18 +38,10 @@ public class DynamicXYZDatasetList implements XYZDataset{
|
|||||||
|
|
||||||
private final double xResolution;
|
private final double xResolution;
|
||||||
private final double yResolution;
|
private final double yResolution;
|
||||||
private final double incX;
|
|
||||||
private final double incY;
|
|
||||||
|
|
||||||
private final NumberAxis xAxis = new NumberAxis();
|
private final NumberAxis xAxis = new NumberAxis();
|
||||||
private double xLowerBound = Double.NaN;
|
|
||||||
private double xUpperBound = Double.NaN;
|
|
||||||
private final NumberAxis yAxis = new NumberAxis();
|
private final NumberAxis yAxis = new NumberAxis();
|
||||||
private double yLowerBound = Double.NaN;
|
|
||||||
private double yUpperBound = Double.NaN;
|
|
||||||
private double zLowerBound = Double.NaN;
|
private double zLowerBound = Double.NaN;
|
||||||
|
|
||||||
|
|
||||||
private double zUpperBound = Double.NaN;
|
private double zUpperBound = Double.NaN;
|
||||||
|
|
||||||
private final XYBlockRenderer renderer = new XYBlockRenderer();
|
private final XYBlockRenderer renderer = new XYBlockRenderer();
|
||||||
@@ -67,17 +58,12 @@ public class DynamicXYZDatasetList implements XYZDataset{
|
|||||||
public DynamicXYZDatasetList(){
|
public DynamicXYZDatasetList(){
|
||||||
xResolution = 1.0;
|
xResolution = 1.0;
|
||||||
yResolution = 1.0;
|
yResolution = 1.0;
|
||||||
incX = xResolution/2;
|
|
||||||
incY = yResolution/2;
|
|
||||||
|
|
||||||
xAxis.setRange(0, 100);
|
xAxis.setRange(0, 100);
|
||||||
yAxis.setRange(0, 100);
|
yAxis.setRange(0, 100);
|
||||||
|
|
||||||
renderer.setBlockWidth(xResolution); // If this is not set the default block size is 1
|
renderer.setBlockWidth(xResolution); // If this is not set the default block size is 1
|
||||||
renderer.setBlockHeight(yResolution); // If this is not set the default block size is 1
|
renderer.setBlockHeight(yResolution); // If this is not set the default block size is 1
|
||||||
renderer.setBlockAnchor(RectangleAnchor.CENTER);
|
renderer.setBlockAnchor(RectangleAnchor.CENTER);
|
||||||
// renderer.setBaseCreateEntities(true, false);
|
|
||||||
// renderer.setBaseCreateEntities(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ import java.util.List;
|
|||||||
import org.jfree.chart.axis.NumberAxis;
|
import org.jfree.chart.axis.NumberAxis;
|
||||||
import org.jfree.chart.renderer.xy.XYBlockRenderer;
|
import org.jfree.chart.renderer.xy.XYBlockRenderer;
|
||||||
import org.jfree.data.DomainOrder;
|
import org.jfree.data.DomainOrder;
|
||||||
import org.jfree.data.general.DatasetChangeEvent;
|
|
||||||
import org.jfree.data.general.DatasetChangeListener;
|
import org.jfree.data.general.DatasetChangeListener;
|
||||||
import org.jfree.data.general.DatasetGroup;
|
import org.jfree.data.general.DatasetGroup;
|
||||||
import org.jfree.data.xy.XYZDataset;
|
import org.jfree.data.xy.XYZDataset;
|
||||||
@@ -32,8 +31,6 @@ import org.jfree.ui.RectangleAnchor;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Dynamic dataset
|
* Dynamic dataset
|
||||||
* @author ebner
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class DynamicXYZDatasetNumber implements XYZDataset{
|
public class DynamicXYZDatasetNumber implements XYZDataset{
|
||||||
|
|
||||||
|
|||||||
@@ -8,15 +8,11 @@ import java.text.DecimalFormat;
|
|||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
import javax.swing.JMenu;
|
import javax.swing.JMenu;
|
||||||
import javax.swing.JMenuItem;
|
import javax.swing.JMenuItem;
|
||||||
import javax.swing.JOptionPane;
|
|
||||||
import javax.swing.WindowConstants;
|
import javax.swing.WindowConstants;
|
||||||
|
|
||||||
import org.jfree.chart.ChartPanel;
|
import org.jfree.chart.ChartPanel;
|
||||||
import org.jfree.chart.JFreeChart;
|
import org.jfree.chart.JFreeChart;
|
||||||
import org.jfree.chart.axis.NumberAxis;
|
import org.jfree.chart.axis.NumberAxis;
|
||||||
import org.jfree.chart.axis.ValueAxis;
|
|
||||||
import org.jfree.chart.event.AxisChangeEvent;
|
|
||||||
import org.jfree.chart.event.AxisChangeListener;
|
|
||||||
import org.jfree.chart.labels.StandardXYZToolTipGenerator;
|
import org.jfree.chart.labels.StandardXYZToolTipGenerator;
|
||||||
import org.jfree.chart.labels.XYZToolTipGenerator;
|
import org.jfree.chart.labels.XYZToolTipGenerator;
|
||||||
import org.jfree.chart.plot.XYPlot;
|
import org.jfree.chart.plot.XYPlot;
|
||||||
@@ -24,8 +20,6 @@ import org.jfree.chart.renderer.LookupPaintScale;
|
|||||||
import org.jfree.chart.renderer.PaintScale;
|
import org.jfree.chart.renderer.PaintScale;
|
||||||
import org.jfree.chart.renderer.xy.XYBlockRenderer;
|
import org.jfree.chart.renderer.xy.XYBlockRenderer;
|
||||||
import org.jfree.chart.title.PaintScaleLegend;
|
import org.jfree.chart.title.PaintScaleLegend;
|
||||||
import org.jfree.data.Range;
|
|
||||||
import org.jfree.ui.RectangleAnchor;
|
|
||||||
import org.jfree.ui.RectangleEdge;
|
import org.jfree.ui.RectangleEdge;
|
||||||
import org.jfree.ui.RectangleInsets;
|
import org.jfree.ui.RectangleInsets;
|
||||||
|
|
||||||
@@ -41,8 +35,6 @@ public class MatrixPlot2 implements Plot {
|
|||||||
private static final int chartPanelHeight = 270;
|
private static final int chartPanelHeight = 270;
|
||||||
|
|
||||||
private String title;
|
private String title;
|
||||||
private String xAxisLabel = "X";
|
|
||||||
private String yAxisLabel = "Y";
|
|
||||||
|
|
||||||
private boolean grayScale = false;
|
private boolean grayScale = false;
|
||||||
|
|
||||||
@@ -51,7 +43,6 @@ public class MatrixPlot2 implements Plot {
|
|||||||
private ChartPanel chartPanel;
|
private ChartPanel chartPanel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
|
||||||
* @param title
|
* @param title
|
||||||
* @param data
|
* @param data
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package ch.psi.plot.xyz;
|
package ch.psi.plot.xyz;
|
||||||
|
|
||||||
//import java.util.Arrays;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
@@ -15,7 +13,6 @@ import org.jfree.data.xy.XYZDataset;
|
|||||||
*/
|
*/
|
||||||
public class MatrixPlotData {
|
public class MatrixPlotData {
|
||||||
|
|
||||||
// Get Logger
|
|
||||||
private static final Logger logger = Logger.getLogger(MatrixPlotData.class.getName());
|
private static final Logger logger = Logger.getLogger(MatrixPlotData.class.getName());
|
||||||
|
|
||||||
private final double minX;
|
private final double minX;
|
||||||
|
|||||||
@@ -22,8 +22,6 @@ package ch.psi.plot.xyz;
|
|||||||
import org.jfree.data.xy.XYZDataset;
|
import org.jfree.data.xy.XYZDataset;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ebner
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class XYZDatasetUtil {
|
public class XYZDatasetUtil {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user