• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

abarbu/matplotlib-haskell: Haskell bindings for Python's Matplotlib

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

abarbu/matplotlib-haskell

开源软件地址(OpenSource Url):

https://github.com/abarbu/matplotlib-haskell

开源编程语言(OpenSource Language):

Haskell 83.6%

开源软件介绍(OpenSource Introduction):

matplotlib contour plot

Matplotlib for Haskell

Build Status Hackage

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.

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




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap