ggplot2 is a great R library for flexible visualizations, based on compositional design of plots. Unfortunately, using it from F# can be sometimes cumbersome. To simplify using ggplot2 from F#, I put together a simple wrapper, ffplot.
You can find more information on my blog.
To use ggplot2 from F#, you'll need the following tools:
- R installation with the ggplot2 package.
- RProvider - F# type provider for calling R from F#.
- Optional: FsLab collects all the necessary dependencies and simplifies other data science tasks in F#.
To use ffplot
, simply reference the ggplot.fs
file from your solution.
You can also add the file using the paket dependency manager
by adding the following line into your paket.dependencies
file:
github evelinag/ffplot ggplot.fs
See paket documentation for more details on referencing Github dependencies.
For creating ggplot2 plots, see examples.fsx
with both simple and more complex examples showing how to use ffplot in F#.