Metadata-Version: 2.1
Name: clingraph
Version: 1.1.1
Summary: A visualizer for graphs defined as facts with special integration for clingo
Home-page: https://github.com/potassco/clingraph
Author: Susana Hahn
Author-email: hahnmartinlu@uni-potsdam.de
License: MIT
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: clingo (>=5.5.0)
Requires-Dist: clorm (>=1.3.6)
Requires-Dist: graphviz
Requires-Dist: networkx (>=2.6)
Requires-Dist: jsonschema
Requires-Dist: jinja2
Provides-Extra: dev
Requires-Dist: pylint (>=2.12) ; extra == 'dev'
Requires-Dist: pytest (>=6.2) ; extra == 'dev'
Provides-Extra: doc
Requires-Dist: nbsphinx ; extra == 'doc'
Requires-Dist: sphinx ; extra == 'doc'
Requires-Dist: sphinx-rtd-theme ; extra == 'doc'
Provides-Extra: gif
Requires-Dist: imageio (==2.28) ; extra == 'gif'
Requires-Dist: pillow ; extra == 'gif'
Provides-Extra: test
Requires-Dist: pytest (>=6.2) ; extra == 'test'
Provides-Extra: tex
Requires-Dist: dot2tex ; extra == 'tex'

# clingraph

A **declarative visualizer for graphs** defined as a set of facts. The graphs are generated using [graphviz](https://graphviz.org) but are defined via fixed predicates that can be computed from logic programs. 

***Graph defined by facts***
```prolog
node(clingraph). node(visual). node(asp).
edge((clingraph,visual)). edge((clingraph,asp)).
attr(node,clingraph,style,filled).
```
***Visualization***
![](./docs/clingraph.png)

Clingraph also contains **special features** for integration with **[clingo](https://potassco.org/clingo/)**, as well as for generating **latex** code and **gifs**!



### Usage

Look at our [documentation page](https://clingraph.readthedocs.io/en/latest/) to see how to use clingraph.

Try clingraph via [command line](https://clingraph.readthedocs.io/en/latest/clingraph/console.html) or as a package online in a jupyter notebook via [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/potassco/clingraph/master?labpath=notebook.ipynb)


### Examples

Our **[examples folder](https://github.com/potassco/clingraph/tree/master/examples)** shows how to use the range of functionalities in different applications. 

- Examples used in the documentation ([doc](https://github.com/potassco/clingraph/tree/master/examples/doc))
  - *Attribute definition* ([example1](https://github.com/potassco/clingraph/tree/master/examples/doc/example1))
  - *Multi graphs* ([example2](https://github.com/potassco/clingraph/tree/master/examples/doc/example2))
  - *Subgraphs* ([example3](https://github.com/potassco/clingraph/tree/master/examples/doc/example3))
  - *Complex attributes* ([example4](https://github.com/potassco/clingraph/tree/master/examples/doc/example4))
  - *Clingo integration with multi model* ([example5](https://github.com/potassco/clingraph/examples/doc/example5))
  - *Latex integration* ([example6](https://github.com/potassco/clingraph/tree/master/examples/doc/example6))
- Simple ([color](https://github.com/potassco/clingraph/tree/master/examples/color), [cube](https://github.com/potassco/clingraph/tree/master/examples/cube), [lights](https://github.com/potassco/clingraph/tree/master/examples/lights))
- Clingo integration ([sudoku](https://github.com/potassco/clingraph/tree/master/examples/sudoku), [reify](https://github.com/potassco/clingraph/tree/master/examples/reify), [transition_system](https://github.com/potassco/clingraph/tree/master/examples/transition_system))
  - *Absolute positioning*
  - *Legends*
  - *Latex integration*
- Dynamic applications ([asprilo](https://github.com/potassco/clingraph/tree/master/examples/asprilo), [elevator](https://github.com/potassco/clingraph/tree/master/examples/elevator), [minotaur](https://github.com/potassco/clingraph/tree/master/examples/minotaur))
  - *Clingo integration*
  - *Multi graphs*
  - *Animation via Gif*
- SVG interaction ([family_tree](https://github.com/potassco/clingraph/tree/master/examples/family_tree), [queens_interactive](https://github.com/potassco/clingraph/tree/master/examples/queens_interactive), [minesweeper](https://github.com/potassco/clingraph/tree/master/examples/minesweeper))
  - *Interaction using SVG*
- Visualizing  the [solving](https://github.com/potassco/clingraph/tree/master/examples/propagator) and [program structure](https://github.com/potassco/clingraph/tree/master/examples/ast)


## Installation

### Requirements

- Python (version 3.8, 3.9, or 3.10)

For instructions to install from source, pip and conda see our [documentation page](https://clingraph.readthedocs.io/en/latest/clingraph/installation.html).
