Hello everyone,
I have released hgg, a Haskell-native declarative plotting library based on the grammar of graphics.
Plots in hgg are pure values built by monoid composition:
raw |>>
layer
( scatter "x" "y"
<> colorBy "group"
)
<> layer (statLm “x” “y”)
<> title “Result”
<> theme ThemeGrey
Current features include:
- Common statistical plots, including scatter, line, bar, histogram, density, box, violin, heatmap, contour, and forest plots
- Layered composition, facets, subplots, annotations, themes, scales, and legends
- SVG, PDF, PNG, TikZ, and IHaskell output
- DataFrame integration
- Statistical model integration with hanalyze
- 3D plots, MCMC diagnostics, DAGs
- Custom marks
The umbrella “hgg” package includes the core library, DataFrame binding, and SVG backend:
build-depends: hgg
The project is currently practical but pre-1.0, and the API is still stabilising.
GitHub:
Hackage:
Feedback on the API, documentation, portability, generated figures, and missing use cases would be very helpful. Bug reports and contributions are also welcome.
