Untitled

 avatar
unknown
plain_text
4 months ago
2.0 kB
2
Indexable
from graphviz import Digraph

# Create a new directed graph
mind_map = Digraph("White_Collar_Crime", format="png")
mind_map.attr(rankdir="LR", size="8,5")

# Main topic
mind_map.node("main", "Jenayah Kolar Putih - Penipuan Bank", shape="ellipse", style="filled", color="lightblue")

# Subtopics
mind_map.node("aspect", "Aspek Utama Kes", shape="box", style="rounded,filled", color="lightgrey")
mind_map.node("law", "Pertimbangan Undang-Undang & Etika", shape="box", style="rounded,filled", color="lightgrey")
mind_map.node("impact", "Kesan Lebih Luas", shape="box", style="rounded,filled", color="lightgrey")

# Subtopic: Aspek Utama Kes
mind_map.node("crime", "Jenayah Kolar Putih", shape="box")
mind_map.node("relation", "Dinamik Anak & Bapa", shape="box")
mind_map.node("fraud", "Penipuan Bank", shape="box")
mind_map.edge("aspect", "crime")
mind_map.edge("aspect", "relation")
mind_map.edge("aspect", "fraud")

# Details under aspects
mind_map.node("types", "Contoh: Pemalsuan,\nCek Palsu,\nIdentiti Palsu", shape="note", color="orange")
mind_map.node("dynamic", "Kerjasama & Pengaruh", shape="note", color="orange")
mind_map.edge("fraud", "types")
mind_map.edge("relation", "dynamic")

# Subtopic: Pertimbangan Undang-Undang & Etika
mind_map.node("legal", "Pendakwaan: Denda, Penjara", shape="box")
mind_map.node("ethics", "Pelanggaran Etika:\nPecah Amanah", shape="box")
mind_map.edge("law", "legal")
mind_map.edge("law", "ethics")

# Subtopic: Kesan Lebih Luas
mind_map.node("bank", "Bank:\nLangkah Keselamatan Baru", shape="box")
mind_map.node("family", "Keluarga:\nPengaruh Negatif", shape="box")
mind_map.edge("impact", "bank")
mind_map.edge("impact", "family")

# Connect subtopics to main topic
mind_map.edge("main", "aspect")
mind_map.edge("main", "law")
mind_map.edge("main", "impact")

# Render the mind map
mind_map_filepath = "/mnt/data/White_Collar_Crime_Mind_Map"
mind_map.render(mind_map_filepath, cleanup=True)

mind_map_filepath + ".png"
Editor is loading...
Leave a Comment