plot-gtk-ui: A quick way to use Mathematica like Manipulation abilities

[ gpl, library, math ] [ Propose Tags ]

A pre-built ui for plotting based on plot. Quicker to use than plot-gtk, but less configurable, and less versatile.

Only provides ability to plot mathematical functions. But, also allows dynamic plotting functionality similar to Mathematica.

[Skip to Readme]
Versions [faq],,,,,,, (info)
Dependencies base (>=4.7 && <4.9), cairo, colour, fixed-vector, gtk, hmatrix, plot, text, vector [details]
License GPL-2.0-only
Author Sumit Sahrawat
Category Math
Home page
Source repo head: git clone
Uploaded by sumitsahrawat at Mon Sep 28 22:55:42 UTC 2015
Distributions NixOS:
Downloads 2086 total (14 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs not available [build log]
All reported builds failed as of 2016-12-01 [all 5 reports]


  • Graphics
    • Rendering
      • Plot
        • Gtk
          • Graphics.Rendering.Plot.Gtk.UI


Maintainer's Corner

For package maintainers and hackage trustees

Readme for plot-gtk-ui-

[back to package description]


An ambitious attempt to provide mathematica like dynamic plotting for free.


stack install plot-gtk-ui


The best way to try this is to use the calculator package.

Import Graphics.Rendering.Plot.Gtk.UI and follow the examples below.

import Graphics.UI.Gtk
import Graphics.Rendering.Plot.Gtk.UI

main = do
  plotStatic sin (-pi, pi)
  -- Plot sin(x) from -pi to pi


Another simple example.

import Graphics.UI.Gtk
import Graphics.Rendering.Plot.Gtk.UI

main = do
  plotDynamic (\(x, a) -> sin(a * x)) ((-pi, pi), (0, 1))
  -- Plot sin(a * x), where 'x' ranges from -pi to
  -- pi and 'a' ranges between 0 to 1



The error messages might not be completely correct, as there is not a good way to diagnose what caused the error.

Issues that cause errors:

  • Invalid ranges, e.g. X-Range = (1, -1)
  • Automatic-determination of ranges resulting in unplottable ranges, e.g. (0, 0)

If you land on the "Gray screen of no plots" or any other incorrect error message, please raise an issue here.


The plotStatic and plotDynamic functions are implemented in a type-safe manner using fixed-vector.

It also allows one to write functions using appropriate tuples as in the above examples.

Plotting is done using the excellent plot package.