Package smile.plot.swing
Class SparseMatrixPlot
java.lang.Object
smile.plot.swing.Shape
smile.plot.swing.Plot
smile.plot.swing.SparseMatrixPlot
A graphical representation of sparse matrix data. Optionally, the values
in the matrix can be represented as colors.
-
Constructor Summary
ConstructorsConstructorDescriptionSparseMatrixPlot(smile.math.matrix.SparseMatrix sparse, Color color) Constructor.SparseMatrixPlot(smile.math.matrix.SparseMatrix sparse, Color[] palette) Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncanvas()Returns a canvas of the plot.double[]Returns the lower bound of data.double[]Returns the upper bound of data.static SparseMatrixPlotof(smile.math.matrix.SparseMatrix sparse) Creates a sparse matrix plot with blue color for nonzero entries.static SparseMatrixPlotof(smile.math.matrix.SparseMatrix sparse, int k) Creates a sparse matrix plot with the jet color palette.voidDraws the shape.
-
Constructor Details
-
SparseMatrixPlot
Constructor. -
SparseMatrixPlot
Constructor.- Parameters:
palette- the color palette.
-
-
Method Details
-
getLowerBound
public double[] getLowerBound()Description copied from class:PlotReturns the lower bound of data.- Specified by:
getLowerBoundin classPlot
-
getUpperBound
public double[] getUpperBound()Description copied from class:PlotReturns the upper bound of data.- Specified by:
getUpperBoundin classPlot
-
paint
Description copied from class:ShapeDraws the shape. -
canvas
Description copied from class:PlotReturns a canvas of the plot. -
of
Creates a sparse matrix plot with blue color for nonzero entries. -
of
Creates a sparse matrix plot with the jet color palette.- Parameters:
k- the number of colors in the palette.
-