smile.plot
Class Grid
- java.lang.Object
-
- smile.plot.Shape
-
- smile.plot.Plot
-
- smile.plot.Grid
-
public class Grid extends Plot
A 2D grid plot.
-
-
Constructor Summary
Constructors Constructor and Description Grid(double[][][] data)Constructor.Grid(double[][][] data, boolean drawNodes)Constructor.Grid(double[][][] data, boolean drawNodes, java.awt.Color color)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidpaint(Graphics g)Draw the component with given graphics object.static PlotCanvasplot(double[][][] data)Create a 2D grid plot canvas.static PlotCanvasplot(java.lang.String id, double[][][] data)Create a 2D grid plot canvas.booleansetDrawNodes()Gets if draw the nodes.voidsetDrawNodes(boolean drawNodes)Sets if draw the nodes.-
Methods inherited from class smile.plot.Plot
getID, getToolBar, getToolTip, setID
-
-
-
-
Constructor Detail
-
Grid
public Grid(double[][][] data)
Constructor.- Parameters:
data- an m x n x 2 array which are coordinates of m x n grid.
-
Grid
public Grid(double[][][] data, boolean drawNodes)Constructor.- Parameters:
data- an m x n x 2 array which are coordinates of m x n grid.
-
Grid
public Grid(double[][][] data, boolean drawNodes, java.awt.Color color)Constructor.- Parameters:
data- an m x n x 2 array which are coordinates of m x n grid.
-
-
Method Detail
-
setDrawNodes
public boolean setDrawNodes()
Gets if draw the nodes.
-
setDrawNodes
public void setDrawNodes(boolean drawNodes)
Sets if draw the nodes.
-
paint
public void paint(Graphics g)
Description copied from class:ShapeDraw the component with given graphics object.
-
plot
public static PlotCanvas plot(double[][][] data)
Create a 2D grid plot canvas.- Parameters:
data- an m x n x 2 array which are coordinates of m x n grid.
-
plot
public static PlotCanvas plot(java.lang.String id, double[][][] data)
Create a 2D grid plot canvas.- Parameters:
id- the id of the plot.data- an m x n x 2 array which are coordinates of m x n grid.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG