Package smile.plot.swing
Class Plot
java.lang.Object
smile.plot.swing.Shape
smile.plot.swing.Plot
- Direct Known Subclasses:
BarPlot
,BoxPlot
,Contour
,Dendrogram
,Grid
,Heatmap
,Hexmap
,Histogram3D
,LinePlot
,QQPlot
,ScatterPlot
,ScreePlot
,SparseMatrixPlot
,StaircasePlot
,Surface
,TextPlot
,Wireframe
The abstract base class of plots.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfigure()
Returns a figure containing the plot.abstract double[]
Returns the lower bound of data.abstract double[]
Returns the upper bound of data.legends()
Returns the optional legend of shape.toolbar()
Returns an optional list of components in toolbar to control the plot.tooltip
(double[] coord) Returns an optional tooltip for the object at given coordinates.
-
Constructor Details
-
Plot
public Plot()Constructor. -
Plot
Constructor.- Parameters:
color
- the color of plot.
-
Plot
Constructor.- Parameters:
name
- the name of plot.color
- the color of plot.
-
-
Method Details
-
getLowerBound
public abstract double[] getLowerBound()Returns the lower bound of data.- Returns:
- the lower bound of data.
-
getUpperBound
public abstract double[] getUpperBound()Returns the upper bound of data.- Returns:
- the upper bound of data.
-
figure
Returns a figure containing the plot.- Returns:
- a figure containing the plot.
-
legends
Returns the optional legend of shape.- Returns:
- the optional legend of shape
-
tooltip
Returns an optional tooltip for the object at given coordinates.- Parameters:
coord
- the logical coordinates of current mouse position.- Returns:
- a string if an object with label close to the given coordinates.
-
toolbar
Returns an optional list of components in toolbar to control the plot.- Returns:
- an optional list of toolbar components.
-