0

I'm trying to plot a circos diagram using pycircos

Code:

import pandas as pd
import pycircos
import matplotlib.pyplot as plt

Garc = pycircos.Garc
Gcircle = pycircos.Gcircle

d = {
    'A': ['study1', 'study2', 'study3'],
    'B': ['study1', 'study4', 'study5'],
    'C': ['study1', 'study2']
}

circle = Gcircle(figsize=(8, 8))
# add keys
for name in d.keys():
    print(name)
    arc = Garc(arc_id=name, interspace=0, raxis_range=(935, 985), labelposition=80, label_visible=True)
    circle.add_garc(arc)
circle.set_garcs(-65, 245)
for arc_id in circle.garc_dict:
    circle.tickplot(arc_id, raxis_range=(985, 1000), tickinterval=20000000, ticklabels=None)
circle.figure
circle.figure.savefig("test.png")

Plot:

enter image description here

I would like to add text (i.e. values stored in d, the keys are the arcs) to each arc in the next level circle or inside each arc in the current circle. Example figure is available here.

Suggestions on how to do this will be of great help.

Natasha
  • 1,111
  • 5
  • 28
  • 66

0 Answers0