Untitled

 avatar
unknown
plain_text
a year ago
882 B
10
Indexable


# Create a directed graph for a clean publication-style diagram
dot = Digraph(engine="dot")

# Node styles
dot.attr("node", shape="box", style="rounded,filled", fontname="Arial", fontsize="12")

# Define nodes with colors
dot.node("A", "Doomscrolling\n(Frequency, Duration, Purpose)", fillcolor="#a7c7e7")  # light blue
dot.node("B", "Memory Retention", fillcolor="#b6e3a1")  # light green
dot.node("C", "Academic Achievement", fillcolor="#f7b2b7")  # light pink

# SOP1 as annotation
dot.node("S1", "SOP 1:\nLevel of Doomscrolling", shape="note", fillcolor="#e0e0e0")

# Add edges with labels
dot.edge("A", "B", label="SOP 2", fontsize="11")
dot.edge("B", "C", label="SOP 3", fontsize="11")
dot.edge("S1", "A", style="dashed", color="gray")

# Render to PNG
filepath = "/mnt/data/research_simulacrum_clean"
dot.format = "png"
dot.render(filepath, cleanup=True)

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