Package

breeze

plot

Permalink

package plot

Basic 2-d plotting package. This API is very experimentable, I reserve the right to change everything.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. plot
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class CategoricalPaintScale[T](categories: (T) ⇒ Paint) extends PaintScale[T] with Product with Serializable

    Permalink

    Maps items to colors using the given partial function.

    Maps items to colors using the given partial function. If no color is provided for the given item, then returns PaintScale.nanPaint.

  2. case class CategoricalPaintScaleFactory[T]() extends PaintScaleFactory[T] with Product with Serializable

    Permalink

    Creates a categorical paint scale using the Category20 palette borrowed from Protovis.

    Creates a categorical paint scale using the Category20 palette borrowed from Protovis. http://vis.stanford.edu/protovis/docs/color.html

    Beware that category colors can be reused if the number of distinct items is greater than 20.

  3. trait DomainFunction[T, K, +V] extends AnyRef

    Permalink

    Represents a "function" T that knows its (finite) domain, and can also be applied.

    Represents a "function" T that knows its (finite) domain, and can also be applied. Typeclass.

  4. case class DynamicHistogramBins(number: Int = 10) extends HistogramBins with Product with Serializable

    Permalink

    Create a set of StaticHistogramBins from a number and an (eventual) lower and upper bound.

  5. class Figure extends AnyRef

    Permalink

  6. case class GradientPaintScale[T](lower: T, upper: T, gradient: Array[Color] = PaintScale.WhiteToBlack)(implicit view: (T) ⇒ Double) extends PaintScale[T] with Product with Serializable

    Permalink

    A simple numeric paint scale for mapping a number within a range to a corresponding element of a pre-computed color gradient.

    A simple numeric paint scale for mapping a number within a range to a corresponding element of a pre-computed color gradient. Colors from the given gradient array are used linearly to represent values between lower and upper.

  7. case class GradientPaintScaleFactory[T](gradient: Array[Color] = PaintScale.WhiteToBlack)(implicit view: (T) ⇒ Double) extends PaintScaleFactory[T] with Product with Serializable

    Permalink

    Creates a GradientPaintScale from the min and max of a set of data points.

    Creates a GradientPaintScale from the min and max of a set of data points. bound are supplied.

  8. sealed trait HistogramBins extends AnyRef

    Permalink

    Bins for a histogram.

    Bins for a histogram. These can be implicitly constructed from:

      x : HistogramBins = 10  // 10 dynamically determined histogram bins
      x : HistogramBins = Array(1.0,2.0,3.2) // five buckets wit the given splits
      x : HistogramBins = (0,100,10) // ten bins evenly dividing 0 to 100.
    

  9. sealed trait PaintScale[T] extends (T) ⇒ Paint

    Permalink

    Maps items of type T to a well defined Paint (usually a color).

    Maps items of type T to a well defined Paint (usually a color).

    An implicit conversion exists to make a singleton PaintScaleFactory from a PaintScale instance, which means that PaintScales can be provided directly whenever a PaintScaleFactory is required.

  10. trait PaintScaleFactory[T] extends (Traversable[T]) ⇒ PaintScale[T]

    Permalink

    Constructs a PaintScale for the given type T by examining a set of its values.

  11. class Plot extends AnyRef

    Permalink

    Maintains a set of series (or more strictly, the data from those series) and the necessary JFreeChart stuff to plot them.

  12. trait Series extends AnyRef

    Permalink

    A Series is anything that can be added to a breeze.plot.Plot and plotted

  13. case class StaticHistogramBins(splits: Array[Double]) extends HistogramBins with Product with Serializable

    Permalink

    Set of histograms for binning data using the given splits.

  14. class XYDataset[Item] extends AbstractXYDataset

    Permalink

    An XY dataset consisting of some number of named series, each consisting of items of type Item, with an associated x value, y value, and optionally a name and tooltip.

  15. class XYZDataset[Item] extends AbstractXYZDataset

    Permalink

    An XYX dataset consisting of some number of named series, each consisting of items of type Item, with an associated x value, y value, z value, and optionally a name and tooltip.

Value Members

  1. object DomainFunction

    Permalink
  2. object ExportGraphics

    Permalink

    Utility functions for exporting a Graphics2D drawable to some eps, pdf, and png.

  3. object Figure

    Permalink
  4. object HistogramBins

    Permalink

    Static constructors for HistogramBins.

  5. object PaintScale

    Permalink
  6. object PaintScaleFactory

    Permalink
  7. object Plot

    Permalink
  8. object XYDataset extends Serializable

    Permalink
  9. object XYZDataset extends Serializable

    Permalink
  10. def hist[D, K, V](data: D, bins: HistogramBins = 10, name: String = null)(implicit xv: DomainFunction[D, Int, V], vv: (V) ⇒ Double): Series

    Permalink

    Plots a histogram of the given data into the given number of bins

  11. def image[M, V](img: Matrix[Double], scale: GradientPaintScale[Double] = null, name: String = null, offset: (Int, Int) = (0, 0), labels: PartialFunction[(Int, Int), String] = ..., tips: PartialFunction[(Int, Int), String] = ...): Series

    Permalink

    Displays an image in the current figure, where each cell in the matrix provides color for one square of the image.

    Displays an image in the current figure, where each cell in the matrix provides color for one square of the image.

    img

    A matrix containing the colors to plot

    scale

    Scale used for converting matrix values to colors.

    name

    Series name

    offset

    Offset for indexing the top-left corner of the matrix

    labels

    Labels for some subset of the data points

    tips

    Tooltip popups for some subset of the data points

  12. def plot[X, Y, V](x: X, y: Y, style: Char = '-', colorcode: String = null, name: String = null, lines: Boolean = true, shapes: Boolean = false, labels: (Int) ⇒ String = null.asInstanceOf[Int => String], tips: (Int) ⇒ String = null.asInstanceOf[Int => String])(implicit xv: DomainFunction[X, Int, V], yv: DomainFunction[Y, Int, V], vv: (V) ⇒ Double): Series

    Permalink

    Plots the given y versus the given x with the given style.

    Plots the given y versus the given x with the given style.

    x

    X-coordinates, co-indexed with y (and indexed by keys of type K).

    y

    Y-coordinates, co-indexed with x (and indexed by keys of type K).

    style

    Matlab-like style spec of the series to plot.

    name

    Name of the series to show in the legend.

    labels

    Optional in-graph labels for some points.

    tips

    Optional mouse-over tooltips for some points.

  13. def scatter[X, V, Y, YV](x: X, y: Y, size: (Int) ⇒ Double, colors: (Int) ⇒ Paint = null.asInstanceOf[Int => Paint], labels: (Int) ⇒ String = null.asInstanceOf[Int => String], tips: (Int) ⇒ String = null.asInstanceOf[Int => String], name: String = null)(implicit xv: DomainFunction[X, Int, V], yv: DomainFunction[Y, Int, V], vv: (V) ⇒ Double): Series

    Permalink

    Displays a scatter plot of x versus y, each point drawn at the given size and mapped with the given color.

    Displays a scatter plot of x versus y, each point drawn at the given size and mapped with the given color.

    Example usage: https://gist.github.com/1288473

    x

    The x coordinates to draw as provided by anything that can be seen as a Tensor1.

    y

    The y coordinates to draw as provided by anything that can be seen as a Tensor1.

    size

    The size of each circle (on the same scale as the domain axis)

    labels

    Labels to draw next to each point.

    tips

    Tooltips to show on mouseover for each point.

    name

    Series name for legend

Inherited from AnyRef

Inherited from Any

Ungrouped