Untitled
unknown
plain_text
5 months ago
3.6 kB
2
Indexable
import matplotlib.pyplot as plt import networkx as nx # Create a graph object for the mind map mind_map = nx.DiGraph() # Add nodes (main topics and subtopics) mind_map.add_node("Integrated Exam", size=3000) mind_map.add_node("Senescence (Ch. 3)", size=2000) mind_map.add_node("Membranes and Senescence (Ch. 5)", size=2000) mind_map.add_node("Oxidative Processes (Ch. 7)", size=2000) mind_map.add_node("Free Radicals and Senescence (Ch. 8)", size=2000) mind_map.add_node("Fruit Ripening (Ch. 9)", size=2000) # Add subtopics to Senescence mind_map.add_node("Ethylene Role", size=1000) mind_map.add_node("Programmed Cell Death (PCD)", size=1000) mind_map.add_node("Lipid Peroxidation", size=1000) mind_map.add_edge("Senescence (Ch. 3)", "Ethylene Role") mind_map.add_edge("Senescence (Ch. 3)", "Programmed Cell Death (PCD)") mind_map.add_edge("Senescence (Ch. 3)", "Lipid Peroxidation") # Add subtopics to Membranes and Senescence mind_map.add_node("Phospholipases", size=1000) mind_map.add_node("Membrane Integrity", size=1000) mind_map.add_node("Lipid Phases", size=1000) mind_map.add_edge("Membranes and Senescence (Ch. 5)", "Phospholipases") mind_map.add_edge("Membranes and Senescence (Ch. 5)", "Membrane Integrity") mind_map.add_edge("Membranes and Senescence (Ch. 5)", "Lipid Phases") # Add subtopics to Oxidative Processes mind_map.add_node("ROS Types", size=1000) mind_map.add_node("Antioxidants", size=1000) mind_map.add_node("Impact on Aging", size=1000) mind_map.add_edge("Oxidative Processes (Ch. 7)", "ROS Types") mind_map.add_edge("Oxidative Processes (Ch. 7)", "Antioxidants") mind_map.add_edge("Oxidative Processes (Ch. 7)", "Impact on Aging") # Add subtopics to Free Radicals and Senescence mind_map.add_node("Free Radical Damage", size=1000) mind_map.add_node("ROS Enzymatic Defense", size=1000) mind_map.add_node("Non-Enzymatic Defense", size=1000) mind_map.add_edge("Free Radicals and Senescence (Ch. 8)", "Free Radical Damage") mind_map.add_edge("Free Radicals and Senescence (Ch. 8)", "ROS Enzymatic Defense") mind_map.add_edge("Free Radicals and Senescence (Ch. 8)", "Non-Enzymatic Defense") # Add subtopics to Fruit Ripening mind_map.add_node("Climacteric vs. Non-Climacteric", size=1000) mind_map.add_node("Ethylene in Ripening", size=1000) mind_map.add_node("Enzymatic Changes", size=1000) mind_map.add_edge("Fruit Ripening (Ch. 9)", "Climacteric vs. Non-Climacteric") mind_map.add_edge("Fruit Ripening (Ch. 9)", "Ethylene in Ripening") mind_map.add_edge("Fruit Ripening (Ch. 9)", "Enzymatic Changes") # Add connections between chapters mind_map.add_edge("Senescence (Ch. 3)", "Oxidative Processes (Ch. 7)", weight=2) mind_map.add_edge("Senescence (Ch. 3)", "Free Radicals and Senescence (Ch. 8)", weight=2) mind_map.add_edge("Oxidative Processes (Ch. 7)", "Membranes and Senescence (Ch. 5)", weight=2) mind_map.add_edge("Membranes and Senescence (Ch. 5)", "Fruit Ripening (Ch. 9)", weight=2) mind_map.add_edge("Fruit Ripening (Ch. 9)", "Free Radicals and Senescence (Ch. 8)", weight=2) # Draw the mind map plt.figure(figsize=(12, 12)) positions = nx.spring_layout(mind_map, seed=42, k=0.3) # Layout for better visualization sizes = [mind_map.nodes[n].get('size', 1000) for n in mind_map.nodes] nx.draw_networkx_nodes(mind_map, positions, node_size=sizes, node_color="skyblue", alpha=0.9) nx.draw_networkx_edges(mind_map, positions, width=1, alpha=0.7, arrowsize=15, edge_color="gray") nx.draw_networkx_labels(mind_map, positions, font_size=10, font_color="black") plt.title("Integrated Exam Mind Map", fontsize=14) plt.axis('off') plt.show()
Editor is loading...
Leave a Comment