Class 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 Details

    • SparseMatrixPlot

      public SparseMatrixPlot(SparseMatrix sparse, Color color)
      Constructor.
    • SparseMatrixPlot

      public SparseMatrixPlot(SparseMatrix sparse, Color[] palette)
      Constructor.
      Parameters:
      palette - the color palette.
  • Method Details

    • getLowerBound

      public double[] getLowerBound()
      Description copied from class: Plot
      Returns the lower bound of data.
      Specified by:
      getLowerBound in class Plot
    • getUpperBound

      public double[] getUpperBound()
      Description copied from class: Plot
      Returns the upper bound of data.
      Specified by:
      getUpperBound in class Plot
    • paint

      public void paint(Graphics g)
      Description copied from class: Shape
      Draws the shape.
      Specified by:
      paint in class Shape
    • canvas

      public Canvas canvas()
      Description copied from class: Plot
      Returns a canvas of the plot.
      Overrides:
      canvas in class Plot
    • of

      public static SparseMatrixPlot of(SparseMatrix sparse)
      Creates a sparse matrix plot with blue color for nonzero entries.
    • of

      public static SparseMatrixPlot of(SparseMatrix sparse, int k)
      Creates a sparse matrix plot with the jet color palette.
      Parameters:
      k - the number of colors in the palette.