smile.plot
Class SparseMatrixPlot
- java.lang.Object
-
- smile.plot.Shape
-
- smile.plot.Plot
-
- smile.plot.SparseMatrixPlot
-
public class SparseMatrixPlot extends Plot
A graphical representation of sparse matrix data. Optionally, the values in the matrix can be represented as colors.
-
-
Constructor Summary
Constructors Constructor and Description SparseMatrixPlot(SparseMatrix sparse)Constructor.SparseMatrixPlot(SparseMatrix sparse, java.awt.Color color)Constructor.SparseMatrixPlot(SparseMatrix sparse, java.awt.Color[] palette)Constructor.SparseMatrixPlot(SparseMatrix sparse, int k)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(SparseMatrix sparse)Create a sparse matrix plot canvas.static PlotCanvasplot(SparseMatrix sparse, java.awt.Color color)Create a sparse matrix plot canvas.static PlotCanvasplot(SparseMatrix sparse, java.awt.Color[] palette)Create a sparse matrix plot canvas.-
Methods inherited from class smile.plot.Plot
getID, getToolBar, getToolTip, setID
-
-
-
-
Constructor Detail
-
SparseMatrixPlot
public SparseMatrixPlot(SparseMatrix sparse)
Constructor. Use blue color for nonzero entries.
-
SparseMatrixPlot
public SparseMatrixPlot(SparseMatrix sparse, java.awt.Color color)
Constructor.
-
SparseMatrixPlot
public SparseMatrixPlot(SparseMatrix sparse, int k)
Constructor. Use jet color palette.- Parameters:
k- the number of colors in the palette.
-
SparseMatrixPlot
public SparseMatrixPlot(SparseMatrix sparse, java.awt.Color[] palette)
Constructor.- Parameters:
palette- the color palette.
-
-
Method Detail
-
paint
public void paint(Graphics g)
Description copied from class:ShapeDraw the component with given graphics object.
-
plot
public static PlotCanvas plot(SparseMatrix sparse)
Create a sparse matrix plot canvas.- Parameters:
sparse- a sparse matrix.
-
plot
public static PlotCanvas plot(SparseMatrix sparse, java.awt.Color color)
Create a sparse matrix plot canvas.- Parameters:
sparse- a sparse matrix.
-
plot
public static PlotCanvas plot(SparseMatrix sparse, java.awt.Color[] palette)
Create a sparse matrix plot canvas.- Parameters:
sparse- a sparse matrix.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG