import zsx_ring_plot as rp
import matplotlib.pyplot as plt
import numpy as np
import math
import warnings
warnings.filterwarnings("ignore")
plt.figure(figsize=(8, 8))
plt.xlim(-1.3, 1.3)
plt.ylim(-1.3, 1.3)
plt.axis('off')
x_data = [1, 2, 3, 4]
label = ['S'+str(i) for i in range(1, 10)]
rp.ring_plot(x_data, label=label, show_value=True)
plt.figure(figsize=(8, 8))
plt.xlim(-1.3, 1.3)
plt.ylim(-1.3, 1.3)
plt.axis('off')
x_data = [1, 2, 3, 4]
label = ['S'+str(i) for i in range(1, 10)]
rp.ring_plot(x_data, r2=0, label=label, show_value=True)
plt.figure(figsize=(8, 8))
plt.xlim(-1.3, 1.3)
plt.ylim(-1.3, 1.3)
plt.axis('off')
x_data = [1, 2, 3, 4]
label = ['S'+str(i) for i in range(1, 10)]
for r2 in np.array(range(5)) / 4:
rp.ring_plot(x_data, r1=r2+0.1, r2=r2)
plt.figure(figsize=(8, 8))
plt.xlim(-1.3, 1.3)
plt.ylim(-1.3, 1.3)
plt.axis('off')
x_dataset = [[1], [1], [1], [1, 3], [1]]
colorset = [['mediumpurple'], ['mediumpurple'], ['mediumpurple'], ['mediumpurple', 'wheat'], ['wheat']]
for i, r2 in enumerate(np.array(range(5)) / 4):
x_data = x_dataset[i]
color_list = colorset[i]
rp.ring_plot(x_data, color_list=color_list, r1=r2+0.1, r2=r2)
plt.figure(figsize=(8, 8))
plt.xlim(-1.3, 1.3)
plt.ylim(-1.3, 1.3)
plt.axis('off')
x_data = [1]
color_list1 = ['gray']
rp.ring_plot(x_data, r1=2, r2=0, color_list=color_list1)
x_data = [1, 2, 5]
color_list1 = ['gray', 'white', 'gray']
for r2 in np.array(range(5)) / 4:
rp.ring_plot(x_data, r1=r2+0.1, r2=r2, color_list=color_list1)
plt.figure(figsize=(8, 4.4))
plt.xlim(-1.3, 1.3)
plt.ylim(-0.13, 1.3)
plt.axis('off')
x_data = [1, 1]
color_list1 = ['gray']
rp.Control_center_auto(x_data, i=1, r1=2, r2=0, color_list=color_list1, y0=-0.1)
x_data = [1, 2, 5]
color_list1 = ['gray', 'white', 'gray']
for r2 in np.array(range(5)) / 4:
rp.Control_center_auto(x_data, i=2, r1=r2+0.1, r2=r2, color_list=color_list1)
plt.figure(figsize=(8, 4.4))
plt.xlim(-1.3, 1.3)
plt.ylim(-0.13, 1.3)
plt.axis('off')
x_data = [1, 2, 5]
color_list1 = ['gray', 'gray', 'gray']
for r2 in np.array(range(5)) / 4:
rp.Control_center_auto(x_data, i=2, r1=r2+0.1, r2=r2, color_list=color_list1)
plt.figure(figsize=(8, 8))
plt.xlim(-1.3, 1.3)
plt.ylim(-1.3, 1.3)
plt.axis('off')
x_data1 = [1] * 50
label1 = ['A', 'G', 'T', 'C'] * 13
rp.ring_plot(x_data1, r1=1, r2=0.9, label=label1, show_value=False, rotation='center', number_threshold=0)
x_data2 = [10, 35, 5]
label2 = ['FR2', 'CDR2', 'FR3']
rp.ring_plot(x_data2, r1=0.45, r2=0.4, label=label2)
x_data3 = [0, 5, 10, 15, 20]
rp.ring_plot(x_data3, r1=0.85, r2=0.8)
plt.figure(figsize=(8, 8))
plt.xlim(-1.3, 1.3)
plt.ylim(-1.3, 1.3)
plt.axis('off')
x_data = [1, 1] * 20
color_list1 = ['gray', 'white'] * 20
for r2 in np.array(range(5)) / 5:
rp.ring_plot(x_data, r1=r2+0.1, r2=r2, color_list=color_list1)
x_data = [1, 1] * 20
color_list1 = ['white', 'gray'] * 20
for r2 in np.array(range(5)) / 5:
r2 += 0.1
rp.ring_plot(x_data, r1=r2+0.1, r2=r2, color_list=color_list1)
plt.figure(figsize=(8, 8))
plt.xlim(-1.3, 1.3)
plt.ylim(-1.3, 1.3)
plt.axis('off')
x_data = [1, 1, 1, 1]
color_list = ['white', [50/255, 150/255, 200/255, 1], 'white', [50/255, 150/255, 200/255, 1]]
rp.ring_plot(x_data, r1=0.7, r2=0, color_list=color_list, edge_open=True, lc=[30/255, 30/255, 30/255, 1])
x_data = [1, 2, 2, 2, 9]
label = ['', 'W', 'M', 'B', '']
rp.ring_plot(x_data, r2=0.7, color_list=[[30/255, 30/255, 30/255, 1]]*5,
label=label, rotation='center', threshold=-0.18, fc='white', fs=40)
x_data = [1]
rp.ring_plot(x_data, r1=0.7, r2=0.69, color_list=['lightgray'])
rp.ring_plot(x_data, r1=1, r2=0.99, color_list=['lightgray'])