A plotting library, exportable as eps/pdf/svg/png or renderable with gtk

Version on this page:
LTS Haskell 8.2:
Stackage Nightly 2017-02-11:
Latest on Hackage:
BSD3 licensed by Vivian McPhail
Maintained by haskell.vivian.mcphail <at> gmail <dot> com

Graphics.Rendering.Plot provides an embedded domain-specific
language (EDSL) for creating plots rendered with Cairo

For some examples of use, see .


To install the Plots library:

1. Get the dependencies

The plots library uses Haskell bindings to the Cairo vector
graphics library. In order to build the plots library, you
will first need the following:

* The Cairo library itself. This is probably available through
your system's package manager and may even already be installed.
On Ubuntu, for example, it is available from the 'libcairo'

* The Haskell cairo bindings, which are packaged as part of
cabal install gtk2hs-buildtools
cabal install gtk

* The colour library, which is available from Hackage. If you use
the cabal-install build option described below, the colour
library will be downloaded and installed for you automatically.

2. Build

* Option 1: use cabal-install

If you have cabal-install, *after* installing gtk2hs, you can
install plots and the remaining dependencies with

cabal install plot

Optionally, you can also pass options such as --user
--prefix=$HOME to install locally.

* Option 2: manual build

Once all the dependencies are built and installed, you can build
and install plots as follows:

runhaskell Setup.lhs configure --prefix=$HOME --user
runhaskell Setup.lhs build
runhaskell Setup.lhs install

(Optionally, you can omit the --prefix and --user arguments to the
configure step, and run the install step with 'sudo' in order to
install the library systemwide.)

3. Building Haddock documentation (recommended)

runhaskell Setup.lhs haddock

Once the documentation has been built, you can access it by
pointing your browser to dist/doc/html/plot/index.html.


* initial version
* add candle/whisker plots
* export MinMaxSeries
* fixed examples for Scale (Log/Linear)
* fixed bug (lack of stroke) with datasets larger than window
* hollow points fill with white
* remove Unicode dependency

* improve axis line joins
* annotations
* save/restore cairo annotation
* add setDataset documentation
* improve Dashes
* formattable grid lines
* FormattedSeries, not DecoratedSeries in setDataset documentation
* export withGridLine
* bumped gtk dependency
* changed 'State' constructor to 'state' function to reflect mtl > 2
* fixed bug in surface axis labels
* fixed treatment of 0 in log axes
* fixed reversed range values
* thus reverting non-bug
* export Data.Colour.Names
* change scaling so that miniscule linewidths don't occur
* fix error in scaling
* more fix treatment of 0 in log axes
* switch to github
* fixed .cabal repository line

* fix finding min/max of MinMax series
* fix bar width for Candle/Whisker
* fix x coordinate of Whisker
* change bar width for Bar
* refactor renderSeries
* fixed error bars for non-points
* fixed bug in MinMax with error (logSeriesMinMax)

* changed Ticks datatype
* added linlog and loglin to Simple.hs
* fixed points with single error series (to under/over)
* fixed bug in location of `Value` axis
* added data labels to axes
* fix some warnings
* changed _data_label to _tick_label

* added TickValue renderer
* refactor tickPositions

* fix log labels
* small bug fix when setting ticks

* added `TickFormat` data type

* added `BarSetting` with `BarSpread` and `BarStack`

* don't use textPad when plot title is empty
* add background colours for figure and plot

* deprecate `withTickLabelFormat` for `withTickLabelsFormat`
* fix issue #5, interaction of setPointSize and Legends

* add sampleData action to a plot
* fix bugs (-y) in rendering annotations. Issue #7
* allow v0.13 of pango/cairo
* Update AMP Changes for ghc 7.10
* clean up warnings
* use transformers instead of MaybeT
* update for hmatrix 0.17

comments powered byDisqus