This is a stack
setup for diagrams
library. The actual code is borrowed from diagrams
examples here: https://diagrams.github.io/gallery/Chart.html
$ git clone https://github.com/EugeneN/diagrams-demo.git
$ cd diagrams-demo
$ stack build
$ stack exec diagrams-demo-exe -- -w 400 -h 400 -o result.svg
then open result.svg
file with your favorite image viewer. In Linux/X11 you can use
xdg-open result.svg
command. You should see something like this:
Alternatively, you can run:
$ stack exec diagrams-demo-exe -- --help
to see all the options and their descriptions.
- edit
app/Main.hs
and add your code stack build
stack exec diagrams-demo-exe -- -w 400 -h 400 -o result.svg
xdg-open result.svg
- repeat.