Class PlotProcess2D

  • All Implemented Interfaces:
    Plot

    public class PlotProcess2D
    extends java.lang.Object
    implements Plot
    Small convenient wrapper for JFreeChart line plot of a stochastic process.
    Author:
    Christian Fries
    • Constructor Summary

      Constructors 
      Constructor Description
      PlotProcess2D​(net.finmath.time.TimeDiscretization timeDiscretization, java.util.function.DoubleFunction<net.finmath.stochastic.RandomVariable> process, int maxNumberOfPaths)
      Plot the first (maxNumberOfPaths) paths of a time discrete stochastic process.
      PlotProcess2D​(net.finmath.time.TimeDiscretization timeDiscretization, DoubleToRandomVariableFunction process, int maxNumberOfPaths)
      Plot the first (maxNumberOfPaths) paths of a time discrete stochastic process.
      PlotProcess2D​(net.finmath.time.TimeDiscretization timeDiscretization, Named<java.util.function.DoubleFunction<net.finmath.stochastic.RandomVariable>> process)
      Plot the first 100 paths of a time discrete stochastic process.
      PlotProcess2D​(net.finmath.time.TimeDiscretization timeDiscretization, Named<java.util.function.DoubleFunction<net.finmath.stochastic.RandomVariable>> process, int maxNumberOfPaths)
      Plot the first (maxNumberOfPaths) paths of a time discrete stochastic process.
    • Constructor Detail

      • PlotProcess2D

        public PlotProcess2D​(net.finmath.time.TimeDiscretization timeDiscretization,
                             Named<java.util.function.DoubleFunction<net.finmath.stochastic.RandomVariable>> process,
                             int maxNumberOfPaths)
        Plot the first (maxNumberOfPaths) paths of a time discrete stochastic process.
        Parameters:
        timeDiscretization - The time discretization to be used for the x-axis.
        process - The stochastic process to be plotted against the y-axsis (the first n paths are plotted).
        maxNumberOfPaths - Maximum number of path (n) to be plotted.
      • PlotProcess2D

        public PlotProcess2D​(net.finmath.time.TimeDiscretization timeDiscretization,
                             java.util.function.DoubleFunction<net.finmath.stochastic.RandomVariable> process,
                             int maxNumberOfPaths)
        Plot the first (maxNumberOfPaths) paths of a time discrete stochastic process.
        Parameters:
        timeDiscretization - The time discretization to be used for the x-axis.
        process - The stochastic process to be plotted against the y-axsis (the first n paths are plotted).
        maxNumberOfPaths - Maximum number of path (n) to be plotted.
      • PlotProcess2D

        public PlotProcess2D​(net.finmath.time.TimeDiscretization timeDiscretization,
                             DoubleToRandomVariableFunction process,
                             int maxNumberOfPaths)
        Plot the first (maxNumberOfPaths) paths of a time discrete stochastic process.
        Parameters:
        timeDiscretization - The time discretization to be used for the x-axis.
        process - The stochastic process to be plotted against the y-axsis (the first n paths are plotted).
        maxNumberOfPaths - Maximum number of path (n) to be plotted.
      • PlotProcess2D

        public PlotProcess2D​(net.finmath.time.TimeDiscretization timeDiscretization,
                             Named<java.util.function.DoubleFunction<net.finmath.stochastic.RandomVariable>> process)
        Plot the first 100 paths of a time discrete stochastic process.
        Parameters:
        timeDiscretization - The time discretization to be used for the x-axis.
        process - The stochastic process to be plotted against the y-axsis.
    • Method Detail

      • show

        public void show()
        Specified by:
        show in interface Plot
      • saveAsJPG

        public void saveAsJPG​(java.io.File file,
                              int width,
                              int height)
                       throws java.io.IOException
        Specified by:
        saveAsJPG in interface Plot
        Throws:
        java.io.IOException
      • saveAsPDF

        public void saveAsPDF​(java.io.File file,
                              int width,
                              int height)
                       throws java.io.IOException
        Specified by:
        saveAsPDF in interface Plot
        Throws:
        java.io.IOException
      • saveAsSVG

        public void saveAsSVG​(java.io.File file,
                              int width,
                              int height)
                       throws java.io.IOException
        Specified by:
        saveAsSVG in interface Plot
        Throws:
        java.io.IOException
      • setZAxisLabel

        public Plot setZAxisLabel​(java.lang.String zAxisLabel)
        Specified by:
        setZAxisLabel in interface Plot
      • setIsLegendVisible

        public Plot setIsLegendVisible​(java.lang.Boolean isLegendVisible)
        Specified by:
        setIsLegendVisible in interface Plot
        Parameters:
        isLegendVisible - the isLegendVisible to set
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object