The matplotlib package

[Tags:bsd3, library, test]

Matplotlib is probably the most full featured plotting library out there. These bindings provide a quick, easy, and extensible way to use it in Haskell.

onscreen $ contourF (\a b -> sin (degreesRadians a) + cos (degreesRadians b)) (-100) 100 (-200) 200 10

[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.1.0, 0.1.2.1, 0.2.0, 0.2.1, 0.3.0, 0.4.0, 0.4.1, 0.4.3, 0.4.4, 0.4.5, 0.5.0
Dependencies aeson, base (>=4.7 && <5), bytestring, containers, filepath, process, split, temporary [details]
License BSD3
Copyright 2017 Andrei Barbu
Author Andrei Barbu
Maintainer andrei@0xab.com
Category Graphics
Home page https://github.com/abarbu/matplotlib-haskell
Source repository head: git clone https://github.com/abarbu/matplotlib-haskell
Uploaded Tue May 30 15:32:49 UTC 2017 by AndreiBarbu
Distributions LTSHaskell:0.5.0, NixOS:0.5.0, Stackage:0.5.0, Tumbleweed:0.4.5
Downloads 408 total (41 in the last 30 days)
Votes
2 []
Status Docs available [build log]
Last success reported on 2017-05-30 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for matplotlib

Readme for matplotlib-0.5.0

Matplotlib

Build Status Hackage

Haskell bindings to Python's Matplotlib. It's high time that Haskell had a fully-fledged plotting library!

matplotlib contour plot

Documentation is available on Hackage. For more examples see the tests.

{-# LANGUAGE ExtendedDefaultRules #-}

import Graphics.Matplotlib

degreesRadians a = a * pi / 180.0

main :: IO ()
main = do
  Right _ <- onscreen $ contourF (\a b -> sin (degreesRadians a) + cos (degreesRadians b)) (-100) 100 (-200) 200 10
  return ()

We need -XExtendedDefaultRules to avoid having to manually having to specify certain types.

Installation

You will need several python libraries to run this code which can be installed on Ubuntu machines with the following command:

sudo apt-get install -y python3-pip python3-matplotlib python3-numpy python-mpltoolkits.basemap

If you have instructions for other machines or OSes let me know. We require /usr/bin/python3 to be available; the path isn't configurable right now.

Once you have the prerequisites you can install using the standard incantation

cabal install matplotlib

Examples

Click on any of the examples below to go to the corresponding test that generates it. Depending on your matplotlib version default colors might be different.

integral griddata streamplot hist2DLog quadratic spines annotation corr bivariateNormal images labelled-histogram projections histogram pcolorlog scatter stacked legend errorbar line-options quiver-fancy contour boxplot show-matrix scatterhist hinton density violinplot histMulti cumulative polar hists tex eventplot line-function density-bandwidth quiver pie