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
ConstructorsConstructorDescriptionXYDataSeriesFunctionImpl(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.doublegetX(int i) Gets the x value of the data point at indexi.doublegetY(int i) Gets the y value of the data point at indexi.voidinvokeRecompute(double xmin, double xmax, String name, int sessionId) Invokes a funcRangeInternal if xmin or xmax has changed.intsize()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, yToolTipPatternMethods 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, setYToolTipPatternMethods inherited from class io.deephaven.plot.AbstractSeriesInternal
addPartitionedTableHandle, addSwappableTable, addTableHandle, axes, getPartitionedTableHandles, getSwappableTables, getTableHandles, id, name, removeTableHandleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, yToolTipPatternMethods inherited from interface io.deephaven.plot.datasets.DataSeriesInternal
axes, chart, getErrorBarColor, getGradientVisible, getLineColor, getLineStyle, getLinesVisible, getPlotInfo, getPointLabelFormat, getPointsVisible, getXToolTipPattern, getYToolTipPattern, id, nameMethods inherited from interface io.deephaven.plot.SeriesInternal
addPartitionedTableHandle, addSwappableTable, addTableHandle, getPartitionedTableHandles, getSwappableTables, getTableHandles, removeTableHandleMethods 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, pointSizeMethods 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:SeriesInternalCreate a copy of the series on a different set of axes.- Specified by:
copyin interfaceDataSeriesInternal- Specified by:
copyin interfaceSeriesInternal- Specified by:
copyin interfaceXYDataSeriesInternal- Parameters:
axes- new axes.- Returns:
- copy of the series on a different set of axes.
-
size
public int size()Description copied from interface:DataSeriesInternalGets the size of this data set.- Specified by:
sizein interfaceDataSeriesInternal- Returns:
- size of this data set
-
getX
public double getX(int i) Description copied from interface:XYDataSeriesInternalGets the x value of the data point at indexi.- Specified by:
getXin interfaceXYDataSeriesInternal- Parameters:
i- index- Returns:
- x value of this data point at index
i
-
getY
public double getY(int i) Description copied from interface:XYDataSeriesInternalGets the y value of the data point at indexi.- Specified by:
getYin interfaceXYDataSeriesInternal- Parameters:
i- index- Returns:
- x value of this data point at index
i
-
funcRange
Sets the data range for this series.- Specified by:
funcRangein 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:
funcRangein interfaceXYDataSeriesFunction- Parameters:
xmin- range minimumxmax- range maximumnpoints- number of data points- Returns:
- this data series with the new range
- Throws:
IllegalArgumentException-xminmust not be less thanxmaxxminandxmaxmust be finite. SeeNumeric.isFinite(java.lang.Byte)npointsmust non-negative
-
funcNPoints
Sets the number of data points in this dataset.- Specified by:
funcNPointsin interfaceXYDataSeriesFunction- Parameters:
npoints- number of points- Returns:
- this data series with the specified number of points.
- Throws:
IllegalArgumentException-npointsmust be non-negative.
-
invokeRecompute
Invokes a funcRangeInternal if xmin or xmax has changed. -
funcRangeInternal
Description copied from interface:XYDataSeriesFunctionInternalSets the data range for this series if the user did not set funcRange.- Specified by:
funcRangeInternalin interfaceXYDataSeriesFunctionInternal- Parameters:
xmin- range minimumxmax- range maximum- Returns:
- this data series with the new range
-
funcRangeInternal
Description copied from interface:XYDataSeriesFunctionInternalSets the data range and number of points for this series if the user did not set funcRange.- Specified by:
funcRangeInternalin interfaceXYDataSeriesFunctionInternal- Parameters:
xmin- range minimumxmax- range maximumnpoints- number of data points- Returns:
- this data series with the new range
-
funcNPointsInternal
Description copied from interface:XYDataSeriesFunctionInternalSets the number of data points in this dataset if the user did not set funcNPoints.- Specified by:
funcNPointsInternalin interfaceXYDataSeriesFunctionInternal- Parameters:
npoints- number of points- Returns:
- this data series with the specified number of points.
-