public class SparseMatrixPlot extends Plot
Constructor and Description |
---|
SparseMatrixPlot(smile.math.matrix.SparseMatrix sparse,
java.awt.Color color)
Constructor.
|
SparseMatrixPlot(smile.math.matrix.SparseMatrix sparse,
java.awt.Color[] palette)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Canvas |
canvas()
Returns a canvas of the plot.
|
double[] |
getLowerBound()
Returns the lower bound of data.
|
double[] |
getUpperBound()
Returns the upper bound of data.
|
static SparseMatrixPlot |
of(smile.math.matrix.SparseMatrix sparse)
Creates a sparse matrix plot with blue color for nonzero entries.
|
static SparseMatrixPlot |
of(smile.math.matrix.SparseMatrix sparse,
int k)
Creates a sparse matrix plot with the jet color palette.
|
void |
paint(Graphics g)
Draws the shape.
|
public SparseMatrixPlot(smile.math.matrix.SparseMatrix sparse, java.awt.Color color)
public SparseMatrixPlot(smile.math.matrix.SparseMatrix sparse, java.awt.Color[] palette)
palette
- the color palette.public double[] getLowerBound()
Plot
getLowerBound
in class Plot
public double[] getUpperBound()
Plot
getUpperBound
in class Plot
public static SparseMatrixPlot of(smile.math.matrix.SparseMatrix sparse)
public static SparseMatrixPlot of(smile.math.matrix.SparseMatrix sparse, int k)
k
- the number of colors in the palette.