Metadata-Version: 2.1
Name: arcplot
Version: 0.1.1
Summary: arcplot is a library based on matplotlib for seamless creation of arc diagrams.
License: MIT
Author: Csaba Szallós Kis
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: contourpy (==1.2.0)
Requires-Dist: cycler (==0.12.1)
Requires-Dist: fonttools (==4.48.1)
Requires-Dist: kiwisolver (==1.4.5)
Requires-Dist: matplotlib (==3.8.2)
Requires-Dist: numpy (==1.26.4)
Requires-Dist: packaging (==23.2)
Requires-Dist: pillow (==10.2.0)
Requires-Dist: pyparsing (==3.1.1)
Requires-Dist: python-dateutil (==2.8.2)
Requires-Dist: six (==1.16.0)
Description-Content-Type: text/markdown

# arcplot

[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/szkics/arcplot/blob/main/LICENSE)
[![Python](https://img.shields.io/badge/python-3.6%2B-blue.svg)](https://www.python.org/downloads/release)

[arcplot](https://github.com/szkics/arcplot) is a library based on matplotlib for seamless creation of arc diagrams.

## usage

```py
from arcplot import ArcDiagram

nodes = ["The Good", "The Bad", "The Ugly"]
title = "Characters pointing guns at each other in Sergio Leone's film"
arc_diagram = ArcDiagram(nodes, title)
arc_diagram.set_background_color("#c7a27d")
arc_diagram.connect("The Good", "The Bad")
arc_diagram.connect("The Good", "The Ugly")
arc_diagram.connect("The Ugly", "The Bad")
arc_diagram.show_plot()
```

![alt text](https://raw.githubusercontent.com/szkics/arcplot/main/img/the-good.png?token=GHSAT0AAAAAACNTK4WQAFBU5WC324BUT3SMZOMMLZQ)


```py
nodes = [
    "Angela",
    "Pam",
    "Karen",
    "Holly",
    "Kelly",
    "Jan",
    "Michael",
    "Jim",
    "Andy",
    "Roy",
    "Ryan",
    "Darrel",
    "Dwight",
]
title = "The Office relationships"
arc_diagram = ArcDiagram(nodes, title)
arc_diagram.set_color_map("Pastel2")
arc_diagram.set_background_color("black")
arc_diagram.connect("Pam", "Jim")
arc_diagram.connect("Pam", "Roy")
arc_diagram.connect("Michael", "Holly")
arc_diagram.connect("Michael", "Jan")
arc_diagram.connect("Karen", "Jim")
arc_diagram.connect("Kelly", "Ryan")
arc_diagram.connect("Kelly", "Darrel")
arc_diagram.connect("Angela", "Dwight")
arc_diagram.connect("Angela", "Andy")
arc_diagram.save_plot_as("the-office.png", resolution="300") # resolution is optional, defaults to 'figure'
```

![alt text](https://raw.githubusercontent.com/szkics/arcplot/main/img/the-office.png?token=GHSAT0AAAAAACNTK4WRC5YHOB45DMKKFHTCZOMML2A)

## function list

```py
ArcDiagram(nodes, title) # for initializing an ArcDiagram the entities to connect and the title is required.
.set_background_color(string) # for setting background color of the matplotlib figure.
.set_color_map(string) # for setting color map, choose from: https://matplotlib.org/stable/users/explain/colors/colormaps.html
.connect(start, end) # for creating an arc between two entities.
.show_plot() # for checking the results of the data visualization process.
.save_plot_as(file_name, resolution="100") # for saving file as an image with an optional resolution setting for higher-quality images.
```

## installation

```bash
pip install arcplot
```
