diagrams

Embedded domain-specific language for declarative vector graphics

http://diagrams.github.io

LTS Haskell 22.42:1.4.1
Stackage Nightly 2024-11-24:1.4.1
Latest on Hackage:1.4.1

See all snapshots diagrams appears in

BSD-3-Clause licensed by Brent Yorgey
Maintained by [email protected]
This version can be pinned in stack with:diagrams-1.4.1@sha256:4d8ae5c74626da7924f10933fcf81a86013bfc4bbc82afbbd13ff1e710f56f38,5917

Module documentation for 1.4.1

There are no documented modules for this package.

![Build Status](http://gondor.hendrix.edu:8080/buildStatus/icon?job=Diagrams HEAD)

diagrams is a full-featured framework and domain-specific language (embedded in Haskell) for creating declarative vector graphics and animations.

This package is just a convenient wrapper around the diagrams-core, diagrams-lib, diagrams-svg, and diagrams-contrib packages, so they can be installed with a single cabal install --lib diagrams command.

The package also comes with flags to enable six different backends. The native SVG backend is enabled by the -fsvg flag and is enabled by default. If you don’t want it, you must explicitly disable it with -f-svg.

The native postscript backend is disabled by default but can be enabled by the -fps flag.

The cairo backend is disabled by default but can be selected with the -fcairo flag. In addition, the GTK backend is based on the cairo backend (but split into a separate package to make installing the cairo backend easier). It can be selected with the fgtk flag.

The native rasterific backend which is disabled by default but can be selected with the -frasterific flag.

The native canvas backend which is disabled by default but can be selected with the -fcanvas flag.

Installation

cabal update && cabal install --lib diagrams

or, to get the postscript backend in addition to the SVG backend:

cabal update && cabal install --lib -fps diagrams

or, to get the cairo backend in addition to the SVG backend:

cabal update && cabal install gtk2hs-buildtools && cabal install --lib -fcairo diagrams

Reporting bugs

Issue trackers for all diagrams-related repositories are hosted under the diagrams organization on github. If you know the specific package containing the bug, report it in the issue tracker specific to that package (for example, diagrams-lib). Otherwise, just report the issue in the issue tracker for the general diagrams repository.

Further reading

For more information, including a gallery of examples, tutorial, and user manual, see the diagrams website. For help, join the #diagrams IRC channel on Freenode or the mailing list.

Changes

1.4.1 (11 July 2023)

  • Support GHC up to 9.6
  • Add PGF backend

1.4.0.1 (2 Oct 2021)

  • Updates for GHC up to 9.0
  • Update URL of diagrams website

1.4 (26 Oct 2016)

  • Update to version 1.4 of everything

1.3.0.1 (18 Feb 2016)

  • Allow diagrams-svg-1.4

1.3 (19 April 2015)

  • Update to version 1.3 of everything
  • Add diagrams-canvas backend

1.2 (28 May 2014)

  • diagrams-core-1.2

  • diagrams-lib-1.2

  • diagrams-svg-1.1

  • diagrams-cairo-1.2

  • Add diagrams-rasterific-0.1

1.1.0.1 (19 March 2014)

  • depend on diagrams-postscript-1.0.2, which actually exists (unlike 1.1)

1.1 (8 March 2014)

  • diagrams-core-1.1
  • diagrams-lib-1.1
  • diagrams-svg-1.0.1.4
  • diagrams-postscript-1.1
  • diagrams-cairo-1.1
  • diagrams-gtk-1.0.1
  • diagrams-contrib-1.1.1