Class Plots

java.lang.Object
net.finmath.plots.Plots

public class Plots extends Object
Static factory methods for various plots (used to keep demos short).
Author:
Christian Fries
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Plot2D
    createDensity​(List<Double> values, int numberOfPoints, double standardDeviations)
     
    static Plot2D
    createDensity​(net.finmath.stochastic.RandomVariable randomVariable, int numberOfPoints, double standardDeviations)
     
    static Plot
    createDensityBehindValues​(net.finmath.stochastic.RandomVariable randomVariableX, net.finmath.stochastic.RandomVariable randomVariableY, int numberOfPoints, double standardDeviations)
    Create a histogram behind a value scatter plot.
    static Plot
    createDensityBehindValues​(net.finmath.stochastic.RandomVariable randomVariableX, net.finmath.stochastic.RandomVariable randomVariableY, int numberOfPoints, double standardDeviations, Double xmin, Double xmax)
     
    static Plot2D
    createHistogram​(List<Double> values, int numberOfPoints, double standardDeviations)
     
    static Plot2D
    createHistogram​(net.finmath.stochastic.RandomVariable randomVariable, int numberOfPoints, double standardDeviations)
     
    static Plot
    createHistogramBehindValues​(net.finmath.stochastic.RandomVariable randomVariableX, net.finmath.stochastic.RandomVariable randomVariableY, int numberOfPoints, double standardDeviations)
    Create a histogram behind a value scatter plot.
    static Plot
    createHistogramBehindValues​(net.finmath.stochastic.RandomVariable randomVariableX, net.finmath.stochastic.RandomVariable randomVariableY, int numberOfPoints, double standardDeviations, Double xmin, Double xmax)
     
    static Plot2D
    createPlotOfHistogram​(net.finmath.stochastic.RandomVariable randomVariable, int numberOfPoints, double standardDeviations)
    Deprecated, for removal: This API element is subject to removal in a future version.
    static Plot
    createPlotOfHistogramBehindValues​(net.finmath.stochastic.RandomVariable randomVariableX, net.finmath.stochastic.RandomVariable randomVariableY, int numberOfPoints, double standardDeviations)
    Deprecated, for removal: This API element is subject to removal in a future version.
    static Plot
    createPlotOfHistogramBehindValues​(net.finmath.stochastic.RandomVariable randomVariableX, net.finmath.stochastic.RandomVariable randomVariableY, int numberOfPoints, double standardDeviations, Double xmin, Double xmax)
    Deprecated, for removal: This API element is subject to removal in a future version.
    static Plot2D
    createPlotScatter​(double[] xValues, double[] yValues, double xmin, double xmax, int dotSize)
    Deprecated, for removal: This API element is subject to removal in a future version.
    static Plot2D
    createPlotScatter​(List<Double> x, List<Double> y, double xmin, double xmax, int dotSize)
    Deprecated, for removal: This API element is subject to removal in a future version.
    static Plot2D
    createPlotScatter​(net.finmath.stochastic.RandomVariable x, net.finmath.stochastic.RandomVariable y, double xmin, double xmax)
    Deprecated, for removal: This API element is subject to removal in a future version.
    static Plot2D
    createPlotScatter​(net.finmath.stochastic.RandomVariable x, net.finmath.stochastic.RandomVariable y, double xmin, double xmax, int dotSize)
    Deprecated, for removal: This API element is subject to removal in a future version.
    static Plot2D
    createScatter​(double[] xValues, double[] yValues, double xmin, double xmax, int dotSize)
     
    static Plot
    createScatter​(List<double[]> points, Double xmin, Double xmax, Double ymin, Double ymax, int dotSize)
     
    static Plot2D
    createScatter​(List<Double> x, List<Double> y, double xmin, double xmax, int dotSize)
     
    static Plot2D
    createScatter​(List<Double> x, Map<String,​List<Double>> mapOfValues, double xmin, double xmax, int dotSize)
    Create a scatter plot.
    static Plot2D
    createScatter​(net.finmath.stochastic.RandomVariable x, net.finmath.stochastic.RandomVariable y)
     
    static Plot2D
    createScatter​(net.finmath.stochastic.RandomVariable x, net.finmath.stochastic.RandomVariable y, double xmin, double xmax)
     
    static Plot2D
    createScatter​(net.finmath.stochastic.RandomVariable x, net.finmath.stochastic.RandomVariable y, double xmin, double xmax, int dotSize)
     
    static Plot2D
    updateDensity​(Plot2D histogram, List<Double> values, int numberOfPoints, double standardDeviations)
     
    static Plot2D
    updateDensity​(Plot2D histogram, net.finmath.stochastic.RandomVariable randomVariable, int numberOfPoints, double standardDeviations)
     
    static Plot2D
    updateHistogram​(Plot2D histogram, List<Double> values, int numberOfPoints, double standardDeviations)
     
    static Plot2D
    updateHistogram​(Plot2D histogram, net.finmath.stochastic.RandomVariable randomVariable, int numberOfPoints, double standardDeviations)
     
    static Plot2D
    updatePlotOfHistogram​(Plot2D histogram, net.finmath.stochastic.RandomVariable randomVariable, int numberOfPoints, double standardDeviations)
    Deprecated, for removal: This API element is subject to removal in a future version.
    static Plot2D
    updatePlotScatter​(Plot2D plot, double[] xValues, double[] yValues, double xmin, double xmax, int dotSize)
    Deprecated, for removal: This API element is subject to removal in a future version.
    static Plot2D
    updatePlotScatter​(Plot2D plot, List<Double> x, List<Double> y, double xmin, double xmax, int dotSize)
     
    static Plot2D
    updateScatter​(Plot2D plot, double[] xValues, double[] yValues, double xmin, double xmax, int dotSize)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Plots

      public Plots()
  • Method Details

    • createScatter

      public static Plot2D createScatter(List<Double> x, Map<String,​List<Double>> mapOfValues, double xmin, double xmax, int dotSize)
      Create a scatter plot.
      Parameters:
      x - List of x-values.
      mapOfValues - A map that maps a name to a list of y-values (which will be plotted (x,y) under that name.
      xmin - The min of the x-axis.
      xmax - The max of the x-axis.
      dotSize - The dot size.
      Returns:
      The plot.
    • createScatter

      public static Plot createScatter(List<double[]> points, Double xmin, Double xmax, Double ymin, Double ymax, int dotSize)
    • createScatter

      public static Plot2D createScatter(double[] xValues, double[] yValues, double xmin, double xmax, int dotSize)
    • createScatter

      public static Plot2D createScatter(List<Double> x, List<Double> y, double xmin, double xmax, int dotSize)
    • updateScatter

      public static Plot2D updateScatter(Plot2D plot, double[] xValues, double[] yValues, double xmin, double xmax, int dotSize)
    • updatePlotScatter

      public static Plot2D updatePlotScatter(Plot2D plot, List<Double> x, List<Double> y, double xmin, double xmax, int dotSize)
    • createScatter

      public static Plot2D createScatter(net.finmath.stochastic.RandomVariable x, net.finmath.stochastic.RandomVariable y, double xmin, double xmax, int dotSize)
    • createScatter

      public static Plot2D createScatter(net.finmath.stochastic.RandomVariable x, net.finmath.stochastic.RandomVariable y, double xmin, double xmax)
    • createScatter

      public static Plot2D createScatter(net.finmath.stochastic.RandomVariable x, net.finmath.stochastic.RandomVariable y)
    • createHistogram

      public static Plot2D createHistogram(net.finmath.stochastic.RandomVariable randomVariable, int numberOfPoints, double standardDeviations)
    • createHistogram

      public static Plot2D createHistogram(List<Double> values, int numberOfPoints, double standardDeviations)
    • updateHistogram

      public static Plot2D updateHistogram(Plot2D histogram, net.finmath.stochastic.RandomVariable randomVariable, int numberOfPoints, double standardDeviations)
    • updateHistogram

      public static Plot2D updateHistogram(Plot2D histogram, List<Double> values, int numberOfPoints, double standardDeviations)
    • createHistogramBehindValues

      public static Plot createHistogramBehindValues(net.finmath.stochastic.RandomVariable randomVariableX, net.finmath.stochastic.RandomVariable randomVariableY, int numberOfPoints, double standardDeviations)
      Create a histogram behind a value scatter plot.
      Parameters:
      randomVariableX - The random variable for the independent.
      randomVariableY - The random variable for the dependent.
      numberOfPoints - The number of bins to be used for the histogram.
      standardDeviations - The standard deviations to be covered by the independent.
      Returns:
      The plot.
    • createHistogramBehindValues

      public static Plot createHistogramBehindValues(net.finmath.stochastic.RandomVariable randomVariableX, net.finmath.stochastic.RandomVariable randomVariableY, int numberOfPoints, double standardDeviations, Double xmin, Double xmax)
    • createDensity

      public static Plot2D createDensity(net.finmath.stochastic.RandomVariable randomVariable, int numberOfPoints, double standardDeviations)
    • createDensity

      public static Plot2D createDensity(List<Double> values, int numberOfPoints, double standardDeviations)
    • updateDensity

      public static Plot2D updateDensity(Plot2D histogram, net.finmath.stochastic.RandomVariable randomVariable, int numberOfPoints, double standardDeviations)
    • updateDensity

      public static Plot2D updateDensity(Plot2D histogram, List<Double> values, int numberOfPoints, double standardDeviations)
    • createDensityBehindValues

      public static Plot createDensityBehindValues(net.finmath.stochastic.RandomVariable randomVariableX, net.finmath.stochastic.RandomVariable randomVariableY, int numberOfPoints, double standardDeviations)
      Create a histogram behind a value scatter plot.
      Parameters:
      randomVariableX - The random variable for the independent.
      randomVariableY - The random variable for the dependent.
      numberOfPoints - The number of bins to be used for the histogram.
      standardDeviations - The standard deviations to be covered by the independent.
      Returns:
      The plot.
    • createDensityBehindValues

      public static Plot createDensityBehindValues(net.finmath.stochastic.RandomVariable randomVariableX, net.finmath.stochastic.RandomVariable randomVariableY, int numberOfPoints, double standardDeviations, Double xmin, Double xmax)
    • createPlotOfHistogram

      @Deprecated(forRemoval=true) public static Plot2D createPlotOfHistogram(net.finmath.stochastic.RandomVariable randomVariable, int numberOfPoints, double standardDeviations)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • updatePlotOfHistogram

      @Deprecated(forRemoval=true) public static Plot2D updatePlotOfHistogram(Plot2D histogram, net.finmath.stochastic.RandomVariable randomVariable, int numberOfPoints, double standardDeviations)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createPlotOfHistogramBehindValues

      @Deprecated(forRemoval=true) public static Plot createPlotOfHistogramBehindValues(net.finmath.stochastic.RandomVariable randomVariableX, net.finmath.stochastic.RandomVariable randomVariableY, int numberOfPoints, double standardDeviations)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createPlotOfHistogramBehindValues

      @Deprecated(forRemoval=true) public static Plot createPlotOfHistogramBehindValues(net.finmath.stochastic.RandomVariable randomVariableX, net.finmath.stochastic.RandomVariable randomVariableY, int numberOfPoints, double standardDeviations, Double xmin, Double xmax)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createPlotScatter

      @Deprecated(forRemoval=true) public static Plot2D createPlotScatter(double[] xValues, double[] yValues, double xmin, double xmax, int dotSize)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createPlotScatter

      @Deprecated(forRemoval=true) public static Plot2D createPlotScatter(List<Double> x, List<Double> y, double xmin, double xmax, int dotSize)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • updatePlotScatter

      @Deprecated(forRemoval=true) public static Plot2D updatePlotScatter(Plot2D plot, double[] xValues, double[] yValues, double xmin, double xmax, int dotSize)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createPlotScatter

      @Deprecated(forRemoval=true) public static Plot2D createPlotScatter(net.finmath.stochastic.RandomVariable x, net.finmath.stochastic.RandomVariable y, double xmin, double xmax, int dotSize)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createPlotScatter

      @Deprecated(forRemoval=true) public static Plot2D createPlotScatter(net.finmath.stochastic.RandomVariable x, net.finmath.stochastic.RandomVariable y, double xmin, double xmax)
      Deprecated, for removal: This API element is subject to removal in a future version.