File size: 1,102 Bytes
b63cba3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# ===================
# Part 1: Importing Libraries
# ===================
import matplotlib.pyplot as plt
from matplotlib_venn import venn2

# ===================
# Part 2: Data Preparation
# ===================
# Set the figure size to match the original image's dimensions
plt.figure(figsize=(8, 6))

# Create a Venn diagram
venn = venn2(subsets=(24, 8, 45), set_labels=("CigaR", "ChatRepair"))

# ===================
# Part 3: Plot Configuration and Rendering
# ===================
# Customize the colors and edge styles
venn.get_patch_by_id("10").set_color("pink")
venn.get_patch_by_id("10").set_edgecolor("black")
venn.get_patch_by_id("10").set_linestyle("dashed")
venn.get_patch_by_id("01").set_color("lightgreen")
venn.get_patch_by_id("01").set_edgecolor("black")
venn.get_patch_by_id("01").set_linestyle("dashed")
venn.get_patch_by_id("11").set_color("sandybrown")

# Remove axis
plt.axis("off")

# ===================
# Part 4: Saving Output
# ===================
# Displaying the plot with tight layout to minimize white space
plt.tight_layout()
plt.savefig("HR_13.pdf", bbox_inches="tight")