Customizing the looks of a graph network diagram

To better present the data, we will cover how to customize the design of a graphical network diagram.

Getting ready

To use Graphviz, the graph visualization library, we must first install it on the machine. The official website of Graphviz contains the download and installation instructions available at http://www.graphviz.org. On Debian-based operating systems, Graphviz can be installed using apt-get as follows:

$ sudo apt-get install graphviz-dev graphviz

Next, we need to install the Graphviz Haskell bindings from Cabal as follows:

$ cabal install graphviz

How to do it…

  1. Import the relevant functions and libraries to customize a Graphviz graph as follows:
    import Data.Text.Lazy (Text, pack, unpack) ...

Get Haskell Data Analysis Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.