gnuplot-dsl: Plot Haskell functions in GNUPlot using an eDSL
This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.
This library is a wrapper around the gnuplot program.
Simply, open up a GHCi session and import Graphics.Gnuplot.DSL and you're ready to go. To plot basically anything that can be plotted, use the "plot" function. It currently supports plotting 2D functions, 3D functions, lists of functions and any of those with styles applied to them. Some examples:
plot (\x -> sin (pi * x)) plot (\x y -> x ** 4 + y ** 4) plot [\x -> x ** 3 - x ** 2, exp] plot $ sin `withStyle` FilledCurve
To restrict the domain of a function, use the "withXDomain", "withYDomain" and "withZDomain" functions:
plot $ cos `withXDomain` (0,3) `withYDomain` (Auto, 1)
The library is a bit limited in its other aspects so far, but it allows setting arbitrary gnuplot variables and printing the generated gnuplot command. Use the "plotWithInit" function to do these:
plotWithInit [Set "key" "outside", Toggle "title"] True log
Properties
Versions | 0.1.0 |
---|---|
Change log | None available |
Dependencies | base (>=4.18.2 && <4.19), data-default (>=0.7.1 && <0.8), process (>=1.6.19 && <1.7) [details] |
License | MIT |
Author | Márton Petes |
Maintainer | tx0lwm@inf.elte.hu |
Category | Graphics, Math |
Home page | https://github.com/Thrithralas/gnuplot-dsl/ |
Source repo | head: git clone https://github.com/Thrithralas/gnuplot-dsl/ |
Uploaded | by thrith at 2024-09-18T15:16:27Z |
Modules
- Graphics
- Gnuplot
- Graphics.Gnuplot.DSL
- Graphics.Gnuplot.DSL.Command
- Graphics.Gnuplot.DSL.Drawable
- Graphics.Gnuplot.DSL.Expr
- Graphics.Gnuplot.DSL.Process
- Graphics.Gnuplot.DSL
- Gnuplot
Downloads
- gnuplot-dsl-0.1.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
Package maintainers
For package maintainers and hackage trustees