net.finmath.plots.PlotablePoints2D Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of finmath-lib-plot-extensions Show documentation
Show all versions of finmath-lib-plot-extensions Show documentation
finmath lib plot extensions provide convenient
plotting methods by providing consistent wrappers
to plot libraries (like JFreeChart or JavaFX).
The newest version!
/*
* (c) Copyright Christian P. Fries, Germany. Contact: [email protected].
*
* Created on 21 May 2018
*/
package net.finmath.plots;
import java.util.ArrayList;
import java.util.List;
import net.finmath.plots.axis.NumberAxis;
import net.finmath.stochastic.RandomVariable;
public class PlotablePoints2D implements Plotable2D {
private final String name;
private final List series;
private final NumberAxis domainAxis;
private final NumberAxis rangeAxis;
private final GraphStyle style;
public PlotablePoints2D(final String name, final List series, final NumberAxis domainAxis, final NumberAxis rangeAxis,
final GraphStyle style) {
super();
this.name = name;
this.series = series;
this.domainAxis = domainAxis;
this.rangeAxis = rangeAxis;
this.style = style;
}
public PlotablePoints2D(final String name, final List series, final GraphStyle style) {
this(name, series, null, null, style);
}
public static PlotablePoints2D of(final String name, double[] xValues, double[] yValues, final GraphStyle style) {
final List series = new ArrayList();
for(int i=0; i getSeries() {
return series;
}
@Override
public NumberAxis getDomainAxis() {
return domainAxis;
}
@Override
public NumberAxis getRangeAxis() {
return rangeAxis;
}
@Override
public GraphStyle getStyle() {
return style;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy