Package io.deephaven.plot.datasets.xy
Class XYDataSeriesFunctionImpl
java.lang.Object
io.deephaven.plot.AbstractSeriesInternal
io.deephaven.plot.datasets.AbstractDataSeries
io.deephaven.plot.datasets.xy.AbstractXYDataSeries
io.deephaven.plot.datasets.xy.XYDataSeriesFunctionImpl
- All Implemented Interfaces:
DataSeries
,DataSeriesInternal
,XYDataSeries
,XYDataSeriesFunction
,XYDataSeriesFunctionInternal
,XYDataSeriesInternal
,PlotExceptionCause
,Series
,SeriesInternal
,Serializable
public class XYDataSeriesFunctionImpl
extends AbstractXYDataSeries
implements XYDataSeriesFunctionInternal
XYDataSeriesInternal
based on a function.
By default, this calculates at least 200 data points inside the plots existing range. The number of points can be
increased for a finer grained plot, or decreased if less resolution is needed. The points are recomputed as the
Chart
's x-range changes.- See Also:
-
Constructor Summary
ConstructorDescriptionXYDataSeriesFunctionImpl
(AxesImpl axes, int id, Comparable name, DoubleUnaryOperator function) Creates a XYDataSeriesFunction instance. -
Method Summary
Modifier and TypeMethodDescriptionCreate a copy of the series on a different set of axes.funcNPoints
(int npoints) Sets the number of data points in this dataset.funcNPointsInternal
(int npoints) Sets the number of data points in this dataset if the user did not set funcNPoints.funcRange
(double xmin, double xmax) Sets the data range for this series.funcRange
(double xmin, double xmax, int npoints) Sets the data range for this series.funcRangeInternal
(double xmin, double xmax) Sets the data range for this series if the user did not set funcRange.funcRangeInternal
(double xmin, double xmax, int npoints) Sets the data range and number of points for this series if the user did not set funcRange.double
getX
(int i) Gets the x value of the data point at indexi
.double
getY
(int i) Gets the y value of the data point at indexi
.void
invokeRecompute
(double xmin, double xmax, String name, int sessionId) Invokes a funcRangeInternal if xmin or xmax has changed.int
size()
Gets the size of this data set.Methods inherited from class io.deephaven.plot.datasets.xy.AbstractXYDataSeries
colorsSetSpecific, errorBarColor, errorBarColor, errorBarColor, getPointColor, getPointColor, getPointLabel, getPointLabel, getPointShape, getPointShape, getPointSize, getPointSize, getSeriesColor, gradientVisible, lineColor, lineColor, lineColor, lineStyle, linesVisible, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColorInteger, pointLabel, pointLabel, pointLabel, pointLabel, pointLabel, pointLabelFormat, pointShape, pointShape, pointShape, pointShape, pointShape, pointShape, pointShape, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointsVisible, seriesColor, seriesColor, seriesColor, toolTipPattern, xToolTipPattern, yToolTipPattern
Methods inherited from class io.deephaven.plot.datasets.AbstractDataSeries
chart, getErrorBarColor, getGradientVisible, getLineColor, getLineStyle, getLinesVisible, getPointLabelFormat, getPointsVisible, getXToolTipPattern, getYToolTipPattern, setErrorBarColor, setErrorBarColor, setErrorBarColor, setGradientVisible, setLineColor, setLineColor, setLineColor, setLineStyle, setLinesVisible, setPointLabelFormat, setPointsVisible, setXToolTipPattern, setYToolTipPattern
Methods inherited from class io.deephaven.plot.AbstractSeriesInternal
addPartitionedTableHandle, addSwappableTable, addTableHandle, axes, getPartitionedTableHandles, getSwappableTables, getTableHandles, id, name, removeTableHandle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.deephaven.plot.datasets.DataSeries
errorBarColor, errorBarColor, errorBarColor, gradientVisible, lineColor, lineColor, lineColor, lineStyle, linesVisible, pointColor, pointColor, pointColor, pointLabel, pointLabelFormat, pointShape, pointShape, pointSize, pointSize, pointSize, pointSize, pointsVisible, seriesColor, seriesColor, seriesColor, toolTipPattern, xToolTipPattern, yToolTipPattern
Methods inherited from interface io.deephaven.plot.datasets.DataSeriesInternal
axes, chart, getErrorBarColor, getGradientVisible, getLineColor, getLineStyle, getLinesVisible, getPlotInfo, getPointLabelFormat, getPointsVisible, getXToolTipPattern, getYToolTipPattern, id, name
Methods inherited from interface io.deephaven.plot.SeriesInternal
addPartitionedTableHandle, addSwappableTable, addTableHandle, getPartitionedTableHandles, getSwappableTables, getTableHandles, removeTableHandle
Methods inherited from interface io.deephaven.plot.datasets.xy.XYDataSeries
pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColorInteger, pointLabel, pointLabel, pointLabel, pointLabel, pointShape, pointShape, pointShape, pointShape, pointShape, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize
Methods inherited from interface io.deephaven.plot.datasets.xy.XYDataSeriesInternal
drawXError, drawYError, getEndX, getEndY, getStartX, getStartY
-
Constructor Details
-
XYDataSeriesFunctionImpl
public XYDataSeriesFunctionImpl(AxesImpl axes, int id, Comparable name, DoubleUnaryOperator function) Creates a XYDataSeriesFunction instance.- Parameters:
axes
- axes on which the function will be plottedid
- data series idname
- series namefunction
- function to plot
-
-
Method Details
-
copy
Description copied from interface:SeriesInternal
Create a copy of the series on a different set of axes.- Specified by:
copy
in interfaceDataSeriesInternal
- Specified by:
copy
in interfaceSeriesInternal
- Specified by:
copy
in interfaceXYDataSeriesInternal
- Parameters:
axes
- new axes.- Returns:
- copy of the series on a different set of axes.
-
size
public int size()Description copied from interface:DataSeriesInternal
Gets the size of this data set.- Specified by:
size
in interfaceDataSeriesInternal
- Returns:
- size of this data set
-
getX
public double getX(int i) Description copied from interface:XYDataSeriesInternal
Gets the x value of the data point at indexi
.- Specified by:
getX
in interfaceXYDataSeriesInternal
- Parameters:
i
- index- Returns:
- x value of this data point at index
i
-
getY
public double getY(int i) Description copied from interface:XYDataSeriesInternal
Gets the y value of the data point at indexi
.- Specified by:
getY
in interfaceXYDataSeriesInternal
- Parameters:
i
- index- Returns:
- x value of this data point at index
i
-
funcRange
Sets the data range for this series.- Specified by:
funcRange
in interfaceXYDataSeriesFunction
- Parameters:
xmin
- range minimumxmax
- range maximum- Returns:
- this data series with the new range
-
funcRange
Sets the data range for this series.- Specified by:
funcRange
in interfaceXYDataSeriesFunction
- Parameters:
xmin
- range minimumxmax
- range maximumnpoints
- number of data points- Returns:
- this data series with the new range
- Throws:
IllegalArgumentException
-xmin
must not be less thanxmax
xmin
andxmax
must be finite. SeeNumeric.isFinite(java.lang.Byte)
npoints
must non-negative
-
funcNPoints
Sets the number of data points in this dataset.- Specified by:
funcNPoints
in interfaceXYDataSeriesFunction
- Parameters:
npoints
- number of points- Returns:
- this data series with the specified number of points.
- Throws:
IllegalArgumentException
-npoints
must be non-negative.
-
invokeRecompute
Invokes a funcRangeInternal if xmin or xmax has changed. -
funcRangeInternal
Description copied from interface:XYDataSeriesFunctionInternal
Sets the data range for this series if the user did not set funcRange.- Specified by:
funcRangeInternal
in interfaceXYDataSeriesFunctionInternal
- Parameters:
xmin
- range minimumxmax
- range maximum- Returns:
- this data series with the new range
-
funcRangeInternal
Description copied from interface:XYDataSeriesFunctionInternal
Sets the data range and number of points for this series if the user did not set funcRange.- Specified by:
funcRangeInternal
in interfaceXYDataSeriesFunctionInternal
- Parameters:
xmin
- range minimumxmax
- range maximumnpoints
- number of data points- Returns:
- this data series with the new range
-
funcNPointsInternal
Description copied from interface:XYDataSeriesFunctionInternal
Sets the number of data points in this dataset if the user did not set funcNPoints.- Specified by:
funcNPointsInternal
in interfaceXYDataSeriesFunctionInternal
- Parameters:
npoints
- number of points- Returns:
- this data series with the specified number of points.
-