Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/finmath/finmath-lib-plot-extensions
Convenient abstraction layer for different visualisation frameworks and demos of finmath lib
https://github.com/finmath/finmath-lib-plot-extensions
finmath-lib graphs plot-library
Last synced: 2 months ago
JSON representation
Convenient abstraction layer for different visualisation frameworks and demos of finmath lib
- Host: GitHub
- URL: https://github.com/finmath/finmath-lib-plot-extensions
- Owner: finmath
- License: apache-2.0
- Created: 2018-05-21T13:15:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-11-25T01:10:58.000Z (about 1 year ago)
- Last Synced: 2024-05-10T22:04:43.864Z (8 months ago)
- Topics: finmath-lib, graphs, plot-library
- Language: Java
- Size: 1.91 MB
- Stars: 0
- Watchers: 8
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# finmath lib plot extensions
- - - -
**Convenient abstractions of some plotting libraries and example usages of finmath lib.**
- - - -This project provides abstractions for some plotting libraries (JFreeChart, JavaFX,
JZY3D) and demo usages for finmath lib.
It is provided for convenience to test and explore finmath lib.Main features:
- Create 2D and 3D graphs (using JFreeChart (2D), JavaFX (2D) and JZY3D (3D)).
- Animated 3D visualization (using JZY3D (which uses OpenGL)).
- Save the graphs as PDF (using iText).
- Save the graphs as SVG (using JFreeSVG)
- Easy to use classes and methods with a default style.## Usage
### Easy and lightweight plot creation
Aiming at quick creation of plots, plots can be specified using a function / operator (e.g. via a lambda expression) and a few parameters specifying the discretization:
Plot plot = new Plot2D(0.0, 300.0, 100, function);
plot.setTitle("Black-Scholes Model European Option Value").setXAxisLabel("strike").setYAxisLabel("value");
plot.show();where function is, e.g.,
DoubleUnaryOperator function = (optionStrike) -> {
return AnalyticFormulas.blackScholesOptionValue(initialStockValue, riskFreeRate, volatility, optionMaturity, optionStrike);
};(taken from `net.finmath.plots.demo.Plot2DDemo`).
### Live visualization or 'reactive plots'
The ``Plot2D``supports live updates and can be used as an observer registering to a
(reactive) stream viaplotable -> plot.update(plotable)
where `plotable` is a `List` where a `Plotable2D` can be a function (`DoubleUnaryOperator`)
or a series of `Point2D`.