matplotlib alternatives and similar packages
Based on the "Graphics" category.
Alternatively, view matplotlib alternatives based on common mentions on social networks and blogs.
-
implicit
A math-inspired CAD program in haskell. CSG, bevels, and shells; 2D & 3D geometry; 2D gcode generation... -
log-warper
DISCONTINUED. Logging library to provide more convenient, extremely configurable but simple monadic interface with pretty output
SaaSHub - Software Alternatives and Reviews
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of matplotlib or a related project?
README
Matplotlib for Haskell
Haskell bindings to Python's Matplotlib. It's high time that Haskell had a fully-fledged plotting library! Examples below.
Documentation is available on Hackage.
In GHCi:
:set -XExtendedDefaultRules
import Graphics.Matplotlib
onscreen $ contourF (\a b -> sin (a*pi/180.0) + cos (b*pi/180.0)) (-100) 100 (-200) 200 10
Or in a standalone file
{-# LANGUAGE ExtendedDefaultRules #-}
import Graphics.Matplotlib
main = onscreen $ contourF (\a b -> sin (a*pi/180.0) + cos (degreesRadians b)) (-100) 100 (-200) 200 10
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 python3-pip python3-matplotlib python3-numpy python3-tk python-mpltoolkits.basemap python3-scipy dvipng
If you're using conda
conda install -y matplotlib scipy tk
If you have instructions for other machines or OSes let me know. We require the
python3
binary to be available somewhere in the PATH. We run with
env python3
.
Once you have the prerequisites you can install using the standard incantation
stack install matplotlib
If you use LaTeX markup you will need the requisite packages
sudo apt-get install -y texlive-full
Or with conda
conda install -y -c conda-forge texlive-core
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.