# plot() creates diagram for SIR template

    "\n    digraph sfm {\n\n      graph [layout = dot, rankdir = LR, center=true, outputorder=\"edgesfirst\", pad=0.1, nodesep=0.5, splines = true, concentrate = false]\n\n      # Shared across all nodes (persists until overridden)\n      node [fontsize=18,fontname=\"stix-two-text\",fontcolor=\"black\"]\n\n      # Define stock nodes\n      node [shape=box,style=filled]\n      \"infected\" [id=\"infected\",fillcolor=\"#83D3D4\",label=<Infected<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 1<\/FONT>>, tooltip = \"Stock: Infected\\nName: infected\\nInitial value: 1\\nInflows: New infections\\nOutflows: New recoveries\"]\n\t\"recovered\" [id=\"recovered\",fillcolor=\"#83D3D4\",label=<Recovered<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 0<\/FONT>>, tooltip = \"Stock: Recovered\\nName: recovered\\nInitial value: 0\\nInflows: New recoveries\\nOutflows: —\"]\n\t\"susceptible\" [id=\"susceptible\",fillcolor=\"#83D3D4\",label=<Susceptible<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 99999<\/FONT>>, tooltip = \"Stock: Susceptible\\nName: susceptible\\nInitial value: 99999\\nInflows: —\\nOutflows: New infections\"]\n\n      # Define flow nodes (intermediate nodes for flows)\n      node [style = \"\",shape=plaintext, fontsize=16, width=0.6, height=0.3]\n      \"new_infections\" [id=\"new_infections\",label=<New infections<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Rate = infection_rate<BR/>* susceptible *<BR/>infected<\/FONT>>, tooltip = \"Flow: New infections\\nName: new_infections\\nRate: infection_rate * susceptible * infected\\nFrom: Susceptible\\nTo: Infected\"]\n\t\"new_recoveries\" [id=\"new_recoveries\",label=<New recoveries<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Rate = recovery_rate *<BR/>infected<\/FONT>>, tooltip = \"Flow: New recoveries\\nName: new_recoveries\\nRate: recovery_rate * infected\\nFrom: Infected\\nTo: Recovered\"]\n\n      # Define external cloud nodes\n      \n      \n\n      # Define auxiliary nodes\n      \n      \n\n      # Define constant nodes\n      \n      \n\n      # Define flow edges (stock -> flow_node)\n      edge [style = \"\", arrowhead=\"none\", penwidth=1.1, minlen=1, tailport=\"e\", headport=\"w\"]\n      \"susceptible\" -> \"new_infections\" [color=\"black:#F48153:black\"]\n\t\"infected\" -> \"new_recoveries\" [color=\"black:#F48153:black\"]\n\n      # Define flow edges (flow_node -> stock)\n      edge [style = \"\", arrowhead=\"normal\", arrowsize=1.5, penwidth=1.1, minlen=1, tailport=\"e\", headport=\"w\"]\n      \"new_infections\" -> \"infected\" [color=\"black:#F48153:black\"]\n\t\"new_recoveries\" -> \"recovered\" [color=\"black:#F48153:black\"]\n\n      # Define dependency edges\n      edge [style = \"\", color=\"#999999\", arrowhead=\"open\", arrowsize=0.8, penwidth=1, constraint=false, tailport = \"_\", headport=\"_\"]\n      \"susceptible\" -> \"new_infections\" [headport = \"n\", tailport = \"n\"]\n\t\"infected\" -> \"new_infections\" [headport = \"s\", tailport = \"s\"]\n\t\"infected\" -> \"new_recoveries\" [headport = \"n\", tailport = \"n\"]\n\n      \n\n\n      # Rank groupings\n      \n\n    }\n          "

# plot() creates diagram for simple single-stock model

    "\n    digraph sfm {\n\n      graph [layout = dot, rankdir = LR, center=true, outputorder=\"edgesfirst\", pad=0.1, nodesep=0.5, splines = true, concentrate = false]\n\n      # Shared across all nodes (persists until overridden)\n      node [fontsize=18,fontname=\"stix-two-text\",fontcolor=\"black\"]\n\n      # Define stock nodes\n      node [shape=box,style=filled]\n      \"Stock1\" [id=\"Stock1\",fillcolor=\"#83D3D4\",label=<Population<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 0<\/FONT>>, tooltip = \"Stock: Population\\nName: Stock1\\nInitial value: 0\\nInflows: —\\nOutflows: Birth\"]\n\n      # Define flow nodes (intermediate nodes for flows)\n      node [style = \"\",shape=plaintext, fontsize=16, width=0.6, height=0.3]\n      \"Flow1\" [id=\"Flow1\",label=<Birth<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Rate = 0<\/FONT>>, tooltip = \"Flow: Birth\\nName: Flow1\\nRate: 0\\nFrom: Population\\nTo: outside model boundary\"]\n\n      # Define external cloud nodes\n      node [shape=doublecircle, fixedsize=true, width = .25, height = .25, orientation=15]\n      \"Cloud1\" [label=\"\", tooltip = \"Outside model boundary\\nSink of: Birth\"]\n\n      # Define auxiliary nodes\n      \n      \n\n      # Define constant nodes\n      \n      \n\n      # Define flow edges (stock -> flow_node)\n      edge [style = \"\", arrowhead=\"none\", penwidth=1.1, minlen=1, tailport=\"e\", headport=\"w\"]\n      \"Stock1\" -> \"Flow1\" [color=\"black:#F48153:black\"]\n\n      # Define flow edges (flow_node -> stock)\n      edge [style = \"\", arrowhead=\"normal\", arrowsize=1.5, penwidth=1.1, minlen=1, tailport=\"e\", headport=\"w\"]\n      \"Flow1\" -> \"Cloud1\" [color=\"black:#F48153:black\"]\n\n      # Define dependency edges\n      edge [style = \"\", color=\"#999999\", arrowhead=\"open\", arrowsize=0.8, penwidth=1, constraint=false, tailport = \"_\", headport=\"_\"]\n      \n\n      \n\n\n      # Rank groupings\n      \n\n    }\n          "

# plot() creates diagram with auxiliary variables and dependencies

    "\n    digraph sfm {\n\n      graph [layout = dot, rankdir = LR, center=true, outputorder=\"edgesfirst\", pad=0.1, nodesep=0.5, splines = true, concentrate = false]\n\n      # Shared across all nodes (persists until overridden)\n      node [fontsize=18,fontname=\"stix-two-text\",fontcolor=\"black\"]\n\n      # Define stock nodes\n      node [shape=box,style=filled]\n      \"I\" [id=\"I\",fillcolor=\"#83D3D4\",label=<I<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 0<\/FONT>>, tooltip = \"Stock: I\\nInitial value: 0\\nInflows: —\\nOutflows: —\"]\n\t\"S\" [id=\"S\",fillcolor=\"#83D3D4\",label=<S<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 0<\/FONT>>, tooltip = \"Stock: S\\nInitial value: 0\\nInflows: —\\nOutflows: —\"]\n\n      # Define flow nodes (intermediate nodes for flows)\n      \n      \n\n      # Define external cloud nodes\n      \n      \n\n      # Define auxiliary nodes\n      node [shape=circle,fontsize=16, width=0.15, height=0.15, fixedsize=true, style=filled]\n      \"infection_rate\" [id=\"infection_rate\",fillcolor=\"#E5E5E5\",xlabel=<infection rate<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Equation = S * I * 0.001<\/FONT>>,label=\"\", tooltip = \"Auxiliary: infection rate\\nName: infection_rate\\nEquation: S * I * 0.001\"]\n\n      # Define constant nodes\n      \n      \n\n      # Define flow edges (stock -> flow_node)\n      \n      \n\n      # Define flow edges (flow_node -> stock)\n      \n      \n\n      # Define dependency edges\n      edge [style = \"\", color=\"#999999\", arrowhead=\"open\", arrowsize=0.8, penwidth=1, constraint=false, tailport = \"_\", headport=\"_\"]\n      \"S\" -> \"infection_rate\"\n\t\"I\" -> \"infection_rate\"\n\n      \n\n\n      # Rank groupings\n      \n\n    }\n          "

# plot() with show_dependencies = FALSE hides dependency arrows

    "\n    digraph sfm {\n\n      graph [layout = dot, rankdir = LR, center=true, outputorder=\"edgesfirst\", pad=0.1, nodesep=0.5, splines = true, concentrate = false]\n\n      # Shared across all nodes (persists until overridden)\n      node [fontsize=18,fontname=\"stix-two-text\",fontcolor=\"black\"]\n\n      # Define stock nodes\n      node [shape=box,style=filled]\n      \"S\" [id=\"S\",fillcolor=\"#83D3D4\",label=<S<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 0<\/FONT>>, tooltip = \"Stock: S\\nInitial value: 0\\nInflows: —\\nOutflows: —\"]\n\n      # Define flow nodes (intermediate nodes for flows)\n      \n      \n\n      # Define external cloud nodes\n      \n      \n\n      # Define auxiliary nodes\n      node [shape=circle,fontsize=16, width=0.15, height=0.15, fixedsize=true, style=filled]\n      \"aux1\" [id=\"aux1\",fillcolor=\"#E5E5E5\",xlabel=<aux1<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Equation = S * 2<\/FONT>>,label=\"\", tooltip = \"Auxiliary: aux1\\nEquation: S * 2\"]\n\n      # Define constant nodes\n      \n      \n\n      # Define flow edges (stock -> flow_node)\n      \n      \n\n      # Define flow edges (flow_node -> stock)\n      \n      \n\n      # Define dependency edges\n      \n      \n\n      \n\n\n      # Rank groupings\n      \n\n    }\n          "

# plot() with show_constants = TRUE displays constants

    "\n    digraph sfm {\n\n      graph [layout = dot, rankdir = LR, center=true, outputorder=\"edgesfirst\", pad=0.1, nodesep=0.5, splines = true, concentrate = false]\n\n      # Shared across all nodes (persists until overridden)\n      node [fontsize=18,fontname=\"stix-two-text\",fontcolor=\"black\"]\n\n      # Define stock nodes\n      node [shape=box,style=filled]\n      \"Stock1\" [id=\"Stock1\",fillcolor=\"#83D3D4\",label=<Stock1<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 0<\/FONT>>, tooltip = \"Stock: Stock1\\nInitial value: 0\\nInflows: —\\nOutflows: —\"]\n\n      # Define flow nodes (intermediate nodes for flows)\n      \n      \n\n      # Define external cloud nodes\n      \n      \n\n      # Define auxiliary nodes\n      \n      \n\n      # Define constant nodes\n      node [shape=diamond,fontsize=16,width=0.15, height=0.15, fixedsize=true, style=filled]\n      \"const1\" [id=\"const1\",fillcolor=\"#E5E5E5\",xlabel=<<I>const1<\/I><BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Value = 5<\/FONT>>,label=\"\", tooltip = \"Constant: const1\\nValue: 5\"]\n\n      # Define flow edges (stock -> flow_node)\n      \n      \n\n      # Define flow edges (flow_node -> stock)\n      \n      \n\n      # Define dependency edges\n      edge [style = \"\", color=\"#999999\", arrowhead=\"open\", arrowsize=0.8, penwidth=1, constraint=false, tailport = \"_\", headport=\"_\"]\n      \n\n      \n\n\n      # Rank groupings\n      \n\n    }\n          "

# plot() with show_constants = FALSE hides constants

    "\n    digraph sfm {\n\n      graph [layout = dot, rankdir = LR, center=true, outputorder=\"edgesfirst\", pad=0.1, nodesep=0.5, splines = true, concentrate = false]\n\n      # Shared across all nodes (persists until overridden)\n      node [fontsize=18,fontname=\"stix-two-text\",fontcolor=\"black\"]\n\n      # Define stock nodes\n      node [shape=box,style=filled]\n      \"Stock1\" [id=\"Stock1\",fillcolor=\"#83D3D4\",label=<Stock1<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 0<\/FONT>>, tooltip = \"Stock: Stock1\\nInitial value: 0\\nInflows: —\\nOutflows: —\"]\n\n      # Define flow nodes (intermediate nodes for flows)\n      \n      \n\n      # Define external cloud nodes\n      \n      \n\n      # Define auxiliary nodes\n      \n      \n\n      # Define constant nodes\n      \n      \n\n      # Define flow edges (stock -> flow_node)\n      \n      \n\n      # Define flow edges (flow_node -> stock)\n      \n      \n\n      # Define dependency edges\n      edge [style = \"\", color=\"#999999\", arrowhead=\"open\", arrowsize=0.8, penwidth=1, constraint=false, tailport = \"_\", headport=\"_\"]\n      \n\n      \n\n\n      # Rank groupings\n      \n\n    }\n          "

# plot() with show_aux = FALSE hides auxiliary variables

    "\n    digraph sfm {\n\n      graph [layout = dot, rankdir = LR, center=true, outputorder=\"edgesfirst\", pad=0.1, nodesep=0.5, splines = true, concentrate = false]\n\n      # Shared across all nodes (persists until overridden)\n      node [fontsize=18,fontname=\"stix-two-text\",fontcolor=\"black\"]\n\n      # Define stock nodes\n      node [shape=box,style=filled]\n      \"infected\" [id=\"infected\",fillcolor=\"#83D3D4\",label=<Infected<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 1<\/FONT>>, tooltip = \"Stock: Infected\\nName: infected\\nInitial value: 1\\nInflows: New infections\\nOutflows: New recoveries\"]\n\t\"recovered\" [id=\"recovered\",fillcolor=\"#83D3D4\",label=<Recovered<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 0<\/FONT>>, tooltip = \"Stock: Recovered\\nName: recovered\\nInitial value: 0\\nInflows: New recoveries\\nOutflows: —\"]\n\t\"susceptible\" [id=\"susceptible\",fillcolor=\"#83D3D4\",label=<Susceptible<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 99999<\/FONT>>, tooltip = \"Stock: Susceptible\\nName: susceptible\\nInitial value: 99999\\nInflows: —\\nOutflows: New infections\"]\n\n      # Define flow nodes (intermediate nodes for flows)\n      node [style = \"\",shape=plaintext, fontsize=16, width=0.6, height=0.3]\n      \"new_infections\" [id=\"new_infections\",label=<New infections<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Rate = infection_rate<BR/>* susceptible *<BR/>infected<\/FONT>>, tooltip = \"Flow: New infections\\nName: new_infections\\nRate: infection_rate * susceptible * infected\\nFrom: Susceptible\\nTo: Infected\"]\n\t\"new_recoveries\" [id=\"new_recoveries\",label=<New recoveries<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Rate = recovery_rate *<BR/>infected<\/FONT>>, tooltip = \"Flow: New recoveries\\nName: new_recoveries\\nRate: recovery_rate * infected\\nFrom: Infected\\nTo: Recovered\"]\n\n      # Define external cloud nodes\n      \n      \n\n      # Define auxiliary nodes\n      \n      \n\n      # Define constant nodes\n      node [shape=diamond,fontsize=16,width=0.15, height=0.15, fixedsize=true, style=filled]\n      \"contact_rate\" [id=\"contact_rate\",fillcolor=\"#E5E5E5\",xlabel=<<I>Contact rate<\/I><BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Value = 2<\/FONT>>,label=\"\", tooltip = \"Constant: Contact rate\\nName: contact_rate\\nValue: 2\"]\n\t\"infection_rate\" [id=\"infection_rate\",fillcolor=\"#E5E5E5\",xlabel=<<I>Infection rate<\/I><BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Value = contact_rate /<BR/>total_population<\/FONT>>,label=\"\", tooltip = \"Constant: Infection rate\\nName: infection_rate\\nValue: contact_rate / total_population\"]\n\t\"recovery_rate\" [id=\"recovery_rate\",fillcolor=\"#E5E5E5\",xlabel=<<I>Recovery rate<\/I><BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Value = 0.1<\/FONT>>,label=\"\", tooltip = \"Constant: Recovery rate\\nName: recovery_rate\\nValue: 0.1\"]\n\t\"total_population\" [id=\"total_population\",fillcolor=\"#E5E5E5\",xlabel=<<I>Total population<\/I><BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Value = susceptible +<BR/>infected + recovered<\/FONT>>,label=\"\", tooltip = \"Constant: Total population\\nName: total_population\\nValue: susceptible + infected + recovered\"]\n\n      # Define flow edges (stock -> flow_node)\n      edge [style = \"\", arrowhead=\"none\", penwidth=1.1, minlen=1, tailport=\"e\", headport=\"w\"]\n      \"susceptible\" -> \"new_infections\" [color=\"black:#F48153:black\"]\n\t\"infected\" -> \"new_recoveries\" [color=\"black:#F48153:black\"]\n\n      # Define flow edges (flow_node -> stock)\n      edge [style = \"\", arrowhead=\"normal\", arrowsize=1.5, penwidth=1.1, minlen=1, tailport=\"e\", headport=\"w\"]\n      \"new_infections\" -> \"infected\" [color=\"black:#F48153:black\"]\n\t\"new_recoveries\" -> \"recovered\" [color=\"black:#F48153:black\"]\n\n      # Define dependency edges\n      edge [style = \"\", color=\"#999999\", arrowhead=\"open\", arrowsize=0.8, penwidth=1, constraint=false, tailport = \"_\", headport=\"_\"]\n      \"infection_rate\" -> \"new_infections\"\n\t\"susceptible\" -> \"new_infections\" [headport = \"n\", tailport = \"n\"]\n\t\"infected\" -> \"new_infections\" [headport = \"s\", tailport = \"s\"]\n\t\"recovery_rate\" -> \"new_recoveries\"\n\t\"infected\" -> \"new_recoveries\" [headport = \"n\", tailport = \"n\"]\n\t\"contact_rate\" -> \"infection_rate\"\n\t\"total_population\" -> \"infection_rate\"\n\t\"susceptible\" -> \"total_population\"\n\t\"infected\" -> \"total_population\"\n\t\"recovered\" -> \"total_population\"\n\n      \n\n\n      # Rank groupings\n            {rank=same; \"contact_rate\"; \"infection_rate\" }\n      {rank=same; \"infection_rate\"; \"new_infections\" }\n      {rank=same; \"recovery_rate\"; \"new_recoveries\" }\n      {rank=same; \"total_population\"; \"infection_rate\" }\n\n    }\n          "

# plot() filters variables correctly

    "\n    digraph sfm {\n\n      graph [layout = dot, rankdir = LR, center=true, outputorder=\"edgesfirst\", pad=0.1, nodesep=0.5, splines = true, concentrate = false]\n\n      # Shared across all nodes (persists until overridden)\n      node [fontsize=18,fontname=\"stix-two-text\",fontcolor=\"black\"]\n\n      # Define stock nodes\n      node [shape=box,style=filled]\n      \"infected\" [id=\"infected\",fillcolor=\"#83D3D4\",label=<Infected<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 1<\/FONT>>, tooltip = \"Stock: Infected\\nName: infected\\nInitial value: 1\\nInflows: —\\nOutflows: —\"]\n\t\"susceptible\" [id=\"susceptible\",fillcolor=\"#83D3D4\",label=<Susceptible<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 99999<\/FONT>>, tooltip = \"Stock: Susceptible\\nName: susceptible\\nInitial value: 99999\\nInflows: —\\nOutflows: —\"]\n\n      # Define flow nodes (intermediate nodes for flows)\n      \n      \n\n      # Define external cloud nodes\n      \n      \n\n      # Define auxiliary nodes\n      \n      \n\n      # Define constant nodes\n      \n      \n\n      # Define flow edges (stock -> flow_node)\n      \n      \n\n      # Define flow edges (flow_node -> stock)\n      \n      \n\n      # Define dependency edges\n      edge [style = \"\", color=\"#999999\", arrowhead=\"open\", arrowsize=0.8, penwidth=1, constraint=false, tailport = \"_\", headport=\"_\"]\n      \n\n      \n\n\n      # Rank groupings\n      \n\n    }\n          "

---

    "\n    digraph sfm {\n\n      graph [layout = dot, rankdir = LR, center=true, outputorder=\"edgesfirst\", pad=0.1, nodesep=0.5, splines = true, concentrate = false]\n\n      # Shared across all nodes (persists until overridden)\n      node [fontsize=18,fontname=\"stix-two-text\",fontcolor=\"black\"]\n\n      # Define stock nodes\n      node [shape=box,style=filled]\n      \"susceptible\" [id=\"susceptible\",fillcolor=\"#83D3D4\",label=<Susceptible<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 99999<\/FONT>>, tooltip = \"Stock: Susceptible\\nName: susceptible\\nInitial value: 99999\\nInflows: —\\nOutflows: —\"]\n\n      # Define flow nodes (intermediate nodes for flows)\n      \n      \n\n      # Define external cloud nodes\n      \n      \n\n      # Define auxiliary nodes\n      \n      \n\n      # Define constant nodes\n      \n      \n\n      # Define flow edges (stock -> flow_node)\n      \n      \n\n      # Define flow edges (flow_node -> stock)\n      \n      \n\n      # Define dependency edges\n      edge [style = \"\", color=\"#999999\", arrowhead=\"open\", arrowsize=0.8, penwidth=1, constraint=false, tailport = \"_\", headport=\"_\"]\n      \n\n      \n\n\n      # Rank groupings\n      \n\n    }\n          "

# plot() applies custom stock color

    "\n    digraph sfm {\n\n      graph [layout = dot, rankdir = LR, center=true, outputorder=\"edgesfirst\", pad=0.1, nodesep=0.5, splines = true, concentrate = false]\n\n      # Shared across all nodes (persists until overridden)\n      node [fontsize=18,fontname=\"stix-two-text\",fontcolor=\"black\"]\n\n      # Define stock nodes\n      node [shape=box,style=filled]\n      \"infected\" [id=\"infected\",fillcolor=\"#FF6B6B\",label=<Infected<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 1<\/FONT>>, tooltip = \"Stock: Infected\\nName: infected\\nInitial value: 1\\nInflows: New infections\\nOutflows: New recoveries\"]\n\t\"recovered\" [id=\"recovered\",fillcolor=\"#FF6B6B\",label=<Recovered<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 0<\/FONT>>, tooltip = \"Stock: Recovered\\nName: recovered\\nInitial value: 0\\nInflows: New recoveries\\nOutflows: —\"]\n\t\"susceptible\" [id=\"susceptible\",fillcolor=\"#FF6B6B\",label=<Susceptible<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 99999<\/FONT>>, tooltip = \"Stock: Susceptible\\nName: susceptible\\nInitial value: 99999\\nInflows: —\\nOutflows: New infections\"]\n\n      # Define flow nodes (intermediate nodes for flows)\n      node [style = \"\",shape=plaintext, fontsize=16, width=0.6, height=0.3]\n      \"new_infections\" [id=\"new_infections\",label=<New infections<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Rate = infection_rate<BR/>* susceptible *<BR/>infected<\/FONT>>, tooltip = \"Flow: New infections\\nName: new_infections\\nRate: infection_rate * susceptible * infected\\nFrom: Susceptible\\nTo: Infected\"]\n\t\"new_recoveries\" [id=\"new_recoveries\",label=<New recoveries<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Rate = recovery_rate *<BR/>infected<\/FONT>>, tooltip = \"Flow: New recoveries\\nName: new_recoveries\\nRate: recovery_rate * infected\\nFrom: Infected\\nTo: Recovered\"]\n\n      # Define external cloud nodes\n      \n      \n\n      # Define auxiliary nodes\n      \n      \n\n      # Define constant nodes\n      \n      \n\n      # Define flow edges (stock -> flow_node)\n      edge [style = \"\", arrowhead=\"none\", penwidth=1.1, minlen=1, tailport=\"e\", headport=\"w\"]\n      \"susceptible\" -> \"new_infections\" [color=\"black:#F48153:black\"]\n\t\"infected\" -> \"new_recoveries\" [color=\"black:#F48153:black\"]\n\n      # Define flow edges (flow_node -> stock)\n      edge [style = \"\", arrowhead=\"normal\", arrowsize=1.5, penwidth=1.1, minlen=1, tailport=\"e\", headport=\"w\"]\n      \"new_infections\" -> \"infected\" [color=\"black:#F48153:black\"]\n\t\"new_recoveries\" -> \"recovered\" [color=\"black:#F48153:black\"]\n\n      # Define dependency edges\n      edge [style = \"\", color=\"#999999\", arrowhead=\"open\", arrowsize=0.8, penwidth=1, constraint=false, tailport = \"_\", headport=\"_\"]\n      \"susceptible\" -> \"new_infections\" [headport = \"n\", tailport = \"n\"]\n\t\"infected\" -> \"new_infections\" [headport = \"s\", tailport = \"s\"]\n\t\"infected\" -> \"new_recoveries\" [headport = \"n\", tailport = \"n\"]\n\n      \n\n\n      # Rank groupings\n      \n\n    }\n          "

# plot() applies custom flow color

    "\n    digraph sfm {\n\n      graph [layout = dot, rankdir = LR, center=true, outputorder=\"edgesfirst\", pad=0.1, nodesep=0.5, splines = true, concentrate = false]\n\n      # Shared across all nodes (persists until overridden)\n      node [fontsize=18,fontname=\"stix-two-text\",fontcolor=\"black\"]\n\n      # Define stock nodes\n      node [shape=box,style=filled]\n      \"infected\" [id=\"infected\",fillcolor=\"#83D3D4\",label=<Infected<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 1<\/FONT>>, tooltip = \"Stock: Infected\\nName: infected\\nInitial value: 1\\nInflows: New infections\\nOutflows: New recoveries\"]\n\t\"recovered\" [id=\"recovered\",fillcolor=\"#83D3D4\",label=<Recovered<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 0<\/FONT>>, tooltip = \"Stock: Recovered\\nName: recovered\\nInitial value: 0\\nInflows: New recoveries\\nOutflows: —\"]\n\t\"susceptible\" [id=\"susceptible\",fillcolor=\"#83D3D4\",label=<Susceptible<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 99999<\/FONT>>, tooltip = \"Stock: Susceptible\\nName: susceptible\\nInitial value: 99999\\nInflows: —\\nOutflows: New infections\"]\n\n      # Define flow nodes (intermediate nodes for flows)\n      node [style = \"\",shape=plaintext, fontsize=16, width=0.6, height=0.3]\n      \"new_infections\" [id=\"new_infections\",label=<New infections<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Rate = infection_rate<BR/>* susceptible *<BR/>infected<\/FONT>>, tooltip = \"Flow: New infections\\nName: new_infections\\nRate: infection_rate * susceptible * infected\\nFrom: Susceptible\\nTo: Infected\"]\n\t\"new_recoveries\" [id=\"new_recoveries\",label=<New recoveries<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Rate = recovery_rate *<BR/>infected<\/FONT>>, tooltip = \"Flow: New recoveries\\nName: new_recoveries\\nRate: recovery_rate * infected\\nFrom: Infected\\nTo: Recovered\"]\n\n      # Define external cloud nodes\n      \n      \n\n      # Define auxiliary nodes\n      \n      \n\n      # Define constant nodes\n      \n      \n\n      # Define flow edges (stock -> flow_node)\n      edge [style = \"\", arrowhead=\"none\", penwidth=1.1, minlen=1, tailport=\"e\", headport=\"w\"]\n      \"susceptible\" -> \"new_infections\" [color=\"black:#4ECDC4:black\"]\n\t\"infected\" -> \"new_recoveries\" [color=\"black:#4ECDC4:black\"]\n\n      # Define flow edges (flow_node -> stock)\n      edge [style = \"\", arrowhead=\"normal\", arrowsize=1.5, penwidth=1.1, minlen=1, tailport=\"e\", headport=\"w\"]\n      \"new_infections\" -> \"infected\" [color=\"black:#4ECDC4:black\"]\n\t\"new_recoveries\" -> \"recovered\" [color=\"black:#4ECDC4:black\"]\n\n      # Define dependency edges\n      edge [style = \"\", color=\"#999999\", arrowhead=\"open\", arrowsize=0.8, penwidth=1, constraint=false, tailport = \"_\", headport=\"_\"]\n      \"susceptible\" -> \"new_infections\" [headport = \"n\", tailport = \"n\"]\n\t\"infected\" -> \"new_infections\" [headport = \"s\", tailport = \"s\"]\n\t\"infected\" -> \"new_recoveries\" [headport = \"n\", tailport = \"n\"]\n\n      \n\n\n      # Rank groupings\n      \n\n    }\n          "

# plot() applies custom dependency color

    "\n    digraph sfm {\n\n      graph [layout = dot, rankdir = LR, center=true, outputorder=\"edgesfirst\", pad=0.1, nodesep=0.5, splines = true, concentrate = false]\n\n      # Shared across all nodes (persists until overridden)\n      node [fontsize=18,fontname=\"stix-two-text\",fontcolor=\"black\"]\n\n      # Define stock nodes\n      node [shape=box,style=filled]\n      \"infected\" [id=\"infected\",fillcolor=\"#83D3D4\",label=<Infected<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 1<\/FONT>>, tooltip = \"Stock: Infected\\nName: infected\\nInitial value: 1\\nInflows: New infections\\nOutflows: New recoveries\"]\n\t\"recovered\" [id=\"recovered\",fillcolor=\"#83D3D4\",label=<Recovered<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 0<\/FONT>>, tooltip = \"Stock: Recovered\\nName: recovered\\nInitial value: 0\\nInflows: New recoveries\\nOutflows: —\"]\n\t\"susceptible\" [id=\"susceptible\",fillcolor=\"#83D3D4\",label=<Susceptible<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 99999<\/FONT>>, tooltip = \"Stock: Susceptible\\nName: susceptible\\nInitial value: 99999\\nInflows: —\\nOutflows: New infections\"]\n\n      # Define flow nodes (intermediate nodes for flows)\n      node [style = \"\",shape=plaintext, fontsize=16, width=0.6, height=0.3]\n      \"new_infections\" [id=\"new_infections\",label=<New infections<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Rate = infection_rate<BR/>* susceptible *<BR/>infected<\/FONT>>, tooltip = \"Flow: New infections\\nName: new_infections\\nRate: infection_rate * susceptible * infected\\nFrom: Susceptible\\nTo: Infected\"]\n\t\"new_recoveries\" [id=\"new_recoveries\",label=<New recoveries<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Rate = recovery_rate *<BR/>infected<\/FONT>>, tooltip = \"Flow: New recoveries\\nName: new_recoveries\\nRate: recovery_rate * infected\\nFrom: Infected\\nTo: Recovered\"]\n\n      # Define external cloud nodes\n      \n      \n\n      # Define auxiliary nodes\n      \n      \n\n      # Define constant nodes\n      \n      \n\n      # Define flow edges (stock -> flow_node)\n      edge [style = \"\", arrowhead=\"none\", penwidth=1.1, minlen=1, tailport=\"e\", headport=\"w\"]\n      \"susceptible\" -> \"new_infections\" [color=\"black:#F48153:black\"]\n\t\"infected\" -> \"new_recoveries\" [color=\"black:#F48153:black\"]\n\n      # Define flow edges (flow_node -> stock)\n      edge [style = \"\", arrowhead=\"normal\", arrowsize=1.5, penwidth=1.1, minlen=1, tailport=\"e\", headport=\"w\"]\n      \"new_infections\" -> \"infected\" [color=\"black:#F48153:black\"]\n\t\"new_recoveries\" -> \"recovered\" [color=\"black:#F48153:black\"]\n\n      # Define dependency edges\n      edge [style = \"\", color=\"#FFE66D\", arrowhead=\"open\", arrowsize=0.8, penwidth=1, constraint=false, tailport = \"_\", headport=\"_\"]\n      \"susceptible\" -> \"new_infections\" [headport = \"n\", tailport = \"n\"]\n\t\"infected\" -> \"new_infections\" [headport = \"s\", tailport = \"s\"]\n\t\"infected\" -> \"new_recoveries\" [headport = \"n\", tailport = \"n\"]\n\n      \n\n\n      # Rank groupings\n      \n\n    }\n          "

# plot() with custom font size

    "\n    digraph sfm {\n\n      graph [layout = dot, rankdir = LR, center=true, outputorder=\"edgesfirst\", pad=0.1, nodesep=0.5, splines = true, concentrate = false]\n\n      # Shared across all nodes (persists until overridden)\n      node [fontsize=12,fontname=\"stix-two-text\",fontcolor=\"black\"]\n\n      # Define stock nodes\n      node [shape=box,style=filled]\n      \"Stock1\" [id=\"Stock1\",fillcolor=\"#83D3D4\",label=<Population<BR/><FONT POINT-SIZE=\"8\" COLOR=\"black\">Initial value = 0<\/FONT>>, tooltip = \"Stock: Population\\nName: Stock1\\nInitial value: 0\\nInflows: —\\nOutflows: —\"]\n\n      # Define flow nodes (intermediate nodes for flows)\n      \n      \n\n      # Define external cloud nodes\n      \n      \n\n      # Define auxiliary nodes\n      \n      \n\n      # Define constant nodes\n      \n      \n\n      # Define flow edges (stock -> flow_node)\n      \n      \n\n      # Define flow edges (flow_node -> stock)\n      \n      \n\n      # Define dependency edges\n      edge [style = \"\", color=\"#999999\", arrowhead=\"open\", arrowsize=0.8, penwidth=1, constraint=false, tailport = \"_\", headport=\"_\"]\n      \n\n      \n\n\n      # Rank groupings\n      \n\n    }\n          "

# plot.stockflow() with custom wrap width

    "\n    digraph sfm {\n\n      graph [layout = dot, rankdir = LR, center=true, outputorder=\"edgesfirst\", pad=0.1, nodesep=0.5, splines = true, concentrate = false]\n\n      # Shared across all nodes (persists until overridden)\n      node [fontsize=18,fontname=\"stix-two-text\",fontcolor=\"black\"]\n\n      # Define stock nodes\n      node [shape=box,style=filled]\n      \"VeryLongStockNameThatShouldWrap\" [id=\"VeryLongStockNameThatShouldWrap\",fillcolor=\"#83D3D4\",label=\"Very Long\nStock\nName That\nShould\nWrap\", tooltip = \"Stock: Very Long Stock Name That Should Wrap\\nName: VeryLongStockNameThatShouldWrap\\nInitial value: 0\\nInflows: —\\nOutflows: —\"]\n\n      # Define flow nodes (intermediate nodes for flows)\n      \n      \n\n      # Define external cloud nodes\n      \n      \n\n      # Define auxiliary nodes\n      \n      \n\n      # Define constant nodes\n      \n      \n\n      # Define flow edges (stock -> flow_node)\n      \n      \n\n      # Define flow edges (flow_node -> stock)\n      \n      \n\n      # Define dependency edges\n      edge [style = \"\", color=\"#999999\", arrowhead=\"open\", arrowsize=0.8, penwidth=1, constraint=false, tailport = \"_\", headport=\"_\"]\n      \n\n      \n\n\n      # Rank groupings\n      \n\n    }\n          "

# plot.stockflow() with format_label = FALSE preserves original labels

    "\n    digraph sfm {\n\n      graph [layout = dot, rankdir = LR, center=true, outputorder=\"edgesfirst\", pad=0.1, nodesep=0.5, splines = true, concentrate = false]\n\n      # Shared across all nodes (persists until overridden)\n      node [fontsize=18,fontname=\"stix-two-text\",fontcolor=\"black\"]\n\n      # Define stock nodes\n      node [shape=box,style=filled]\n      \"Stock_1\" [id=\"Stock_1\",fillcolor=\"#83D3D4\",label=\"Stock_1\", tooltip = \"Stock: Stock_1\\nInitial value: 0\\nInflows: —\\nOutflows: —\"]\n\n      # Define flow nodes (intermediate nodes for flows)\n      \n      \n\n      # Define external cloud nodes\n      \n      \n\n      # Define auxiliary nodes\n      \n      \n\n      # Define constant nodes\n      \n      \n\n      # Define flow edges (stock -> flow_node)\n      \n      \n\n      # Define flow edges (flow_node -> stock)\n      \n      \n\n      # Define dependency edges\n      edge [style = \"\", color=\"#999999\", arrowhead=\"open\", arrowsize=0.8, penwidth=1, constraint=false, tailport = \"_\", headport=\"_\"]\n      \n\n      \n\n\n      # Rank groupings\n      \n\n    }\n          "

# plot.stockflow() with format_label = TRUE removes underscores

    "\n    digraph sfm {\n\n      graph [layout = dot, rankdir = LR, center=true, outputorder=\"edgesfirst\", pad=0.1, nodesep=0.5, splines = true, concentrate = false]\n\n      # Shared across all nodes (persists until overridden)\n      node [fontsize=18,fontname=\"stix-two-text\",fontcolor=\"black\"]\n\n      # Define stock nodes\n      node [shape=box,style=filled]\n      \"Stock_1\" [id=\"Stock_1\",fillcolor=\"#83D3D4\",label=\"Stock 1\", tooltip = \"Stock: Stock 1\\nName: Stock_1\\nInitial value: 0\\nInflows: —\\nOutflows: —\"]\n\n      # Define flow nodes (intermediate nodes for flows)\n      \n      \n\n      # Define external cloud nodes\n      \n      \n\n      # Define auxiliary nodes\n      \n      \n\n      # Define constant nodes\n      \n      \n\n      # Define flow edges (stock -> flow_node)\n      \n      \n\n      # Define flow edges (flow_node -> stock)\n      \n      \n\n      # Define dependency edges\n      edge [style = \"\", color=\"#999999\", arrowhead=\"open\", arrowsize=0.8, penwidth=1, constraint=false, tailport = \"_\", headport=\"_\"]\n      \n\n      \n\n\n      # Rank groupings\n      \n\n    }\n          "

# plot() with show_eqn = TRUE (default) shows equations beneath labels

    "\n    digraph sfm {\n\n      graph [layout = dot, rankdir = LR, center=true, outputorder=\"edgesfirst\", pad=0.1, nodesep=0.5, splines = true, concentrate = false]\n\n      # Shared across all nodes (persists until overridden)\n      node [fontsize=18,fontname=\"stix-two-text\",fontcolor=\"black\"]\n\n      # Define stock nodes\n      node [shape=box,style=filled]\n      \"infected\" [id=\"infected\",fillcolor=\"#83D3D4\",label=<Infected<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 1<\/FONT>>, tooltip = \"Stock: Infected\\nName: infected\\nInitial value: 1\\nInflows: New infections\\nOutflows: New recoveries\"]\n\t\"recovered\" [id=\"recovered\",fillcolor=\"#83D3D4\",label=<Recovered<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 0<\/FONT>>, tooltip = \"Stock: Recovered\\nName: recovered\\nInitial value: 0\\nInflows: New recoveries\\nOutflows: —\"]\n\t\"susceptible\" [id=\"susceptible\",fillcolor=\"#83D3D4\",label=<Susceptible<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 99999<\/FONT>>, tooltip = \"Stock: Susceptible\\nName: susceptible\\nInitial value: 99999\\nInflows: —\\nOutflows: New infections\"]\n\n      # Define flow nodes (intermediate nodes for flows)\n      node [style = \"\",shape=plaintext, fontsize=16, width=0.6, height=0.3]\n      \"new_infections\" [id=\"new_infections\",label=<New infections<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Rate = infection_rate<BR/>* susceptible *<BR/>infected<\/FONT>>, tooltip = \"Flow: New infections\\nName: new_infections\\nRate: infection_rate * susceptible * infected\\nFrom: Susceptible\\nTo: Infected\"]\n\t\"new_recoveries\" [id=\"new_recoveries\",label=<New recoveries<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Rate = recovery_rate *<BR/>infected<\/FONT>>, tooltip = \"Flow: New recoveries\\nName: new_recoveries\\nRate: recovery_rate * infected\\nFrom: Infected\\nTo: Recovered\"]\n\n      # Define external cloud nodes\n      \n      \n\n      # Define auxiliary nodes\n      \n      \n\n      # Define constant nodes\n      node [shape=diamond,fontsize=16,width=0.15, height=0.15, fixedsize=true, style=filled]\n      \"contact_rate\" [id=\"contact_rate\",fillcolor=\"#E5E5E5\",xlabel=<<I>Contact rate<\/I><BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Value = 2<\/FONT>>,label=\"\", tooltip = \"Constant: Contact rate\\nName: contact_rate\\nValue: 2\"]\n\t\"infection_rate\" [id=\"infection_rate\",fillcolor=\"#E5E5E5\",xlabel=<<I>Infection rate<\/I><BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Value = contact_rate /<BR/>total_population<\/FONT>>,label=\"\", tooltip = \"Constant: Infection rate\\nName: infection_rate\\nValue: contact_rate / total_population\"]\n\t\"recovery_rate\" [id=\"recovery_rate\",fillcolor=\"#E5E5E5\",xlabel=<<I>Recovery rate<\/I><BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Value = 0.1<\/FONT>>,label=\"\", tooltip = \"Constant: Recovery rate\\nName: recovery_rate\\nValue: 0.1\"]\n\t\"total_population\" [id=\"total_population\",fillcolor=\"#E5E5E5\",xlabel=<<I>Total population<\/I><BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Value = susceptible +<BR/>infected + recovered<\/FONT>>,label=\"\", tooltip = \"Constant: Total population\\nName: total_population\\nValue: susceptible + infected + recovered\"]\n\n      # Define flow edges (stock -> flow_node)\n      edge [style = \"\", arrowhead=\"none\", penwidth=1.1, minlen=1, tailport=\"e\", headport=\"w\"]\n      \"susceptible\" -> \"new_infections\" [color=\"black:#F48153:black\"]\n\t\"infected\" -> \"new_recoveries\" [color=\"black:#F48153:black\"]\n\n      # Define flow edges (flow_node -> stock)\n      edge [style = \"\", arrowhead=\"normal\", arrowsize=1.5, penwidth=1.1, minlen=1, tailport=\"e\", headport=\"w\"]\n      \"new_infections\" -> \"infected\" [color=\"black:#F48153:black\"]\n\t\"new_recoveries\" -> \"recovered\" [color=\"black:#F48153:black\"]\n\n      # Define dependency edges\n      edge [style = \"\", color=\"#999999\", arrowhead=\"open\", arrowsize=0.8, penwidth=1, constraint=false, tailport = \"_\", headport=\"_\"]\n      \"infection_rate\" -> \"new_infections\"\n\t\"susceptible\" -> \"new_infections\" [headport = \"n\", tailport = \"n\"]\n\t\"infected\" -> \"new_infections\" [headport = \"s\", tailport = \"s\"]\n\t\"recovery_rate\" -> \"new_recoveries\"\n\t\"infected\" -> \"new_recoveries\" [headport = \"n\", tailport = \"n\"]\n\t\"contact_rate\" -> \"infection_rate\"\n\t\"total_population\" -> \"infection_rate\"\n\t\"susceptible\" -> \"total_population\"\n\t\"infected\" -> \"total_population\"\n\t\"recovered\" -> \"total_population\"\n\n      \n\n\n      # Rank groupings\n            {rank=same; \"contact_rate\"; \"infection_rate\" }\n      {rank=same; \"infection_rate\"; \"new_infections\" }\n      {rank=same; \"recovery_rate\"; \"new_recoveries\" }\n      {rank=same; \"total_population\"; \"infection_rate\" }\n\n    }\n          "

# plot.stockflow() show_tooltip = TRUE (default) adds equation tooltips

    "\n    digraph sfm {\n\n      graph [layout = dot, rankdir = LR, center=true, outputorder=\"edgesfirst\", pad=0.1, nodesep=0.5, splines = true, concentrate = false]\n\n      # Shared across all nodes (persists until overridden)\n      node [fontsize=18,fontname=\"stix-two-text\",fontcolor=\"black\"]\n\n      # Define stock nodes\n      node [shape=box,style=filled]\n      \"infected\" [id=\"infected\",fillcolor=\"#83D3D4\",label=<Infected<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 1<\/FONT>>, tooltip = \"Stock: Infected\\nName: infected\\nInitial value: 1\\nInflows: New infections\\nOutflows: New recoveries\"]\n\t\"recovered\" [id=\"recovered\",fillcolor=\"#83D3D4\",label=<Recovered<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 0<\/FONT>>, tooltip = \"Stock: Recovered\\nName: recovered\\nInitial value: 0\\nInflows: New recoveries\\nOutflows: —\"]\n\t\"susceptible\" [id=\"susceptible\",fillcolor=\"#83D3D4\",label=<Susceptible<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 99999<\/FONT>>, tooltip = \"Stock: Susceptible\\nName: susceptible\\nInitial value: 99999\\nInflows: —\\nOutflows: New infections\"]\n\n      # Define flow nodes (intermediate nodes for flows)\n      node [style = \"\",shape=plaintext, fontsize=16, width=0.6, height=0.3]\n      \"new_infections\" [id=\"new_infections\",label=<New infections<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Rate = infection_rate<BR/>* susceptible *<BR/>infected<\/FONT>>, tooltip = \"Flow: New infections\\nName: new_infections\\nRate: infection_rate * susceptible * infected\\nFrom: Susceptible\\nTo: Infected\"]\n\t\"new_recoveries\" [id=\"new_recoveries\",label=<New recoveries<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Rate = recovery_rate *<BR/>infected<\/FONT>>, tooltip = \"Flow: New recoveries\\nName: new_recoveries\\nRate: recovery_rate * infected\\nFrom: Infected\\nTo: Recovered\"]\n\n      # Define external cloud nodes\n      \n      \n\n      # Define auxiliary nodes\n      \n      \n\n      # Define constant nodes\n      node [shape=diamond,fontsize=16,width=0.15, height=0.15, fixedsize=true, style=filled]\n      \"contact_rate\" [id=\"contact_rate\",fillcolor=\"#E5E5E5\",xlabel=<<I>Contact rate<\/I><BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Value = 2<\/FONT>>,label=\"\", tooltip = \"Constant: Contact rate\\nName: contact_rate\\nValue: 2\"]\n\t\"infection_rate\" [id=\"infection_rate\",fillcolor=\"#E5E5E5\",xlabel=<<I>Infection rate<\/I><BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Value = contact_rate /<BR/>total_population<\/FONT>>,label=\"\", tooltip = \"Constant: Infection rate\\nName: infection_rate\\nValue: contact_rate / total_population\"]\n\t\"recovery_rate\" [id=\"recovery_rate\",fillcolor=\"#E5E5E5\",xlabel=<<I>Recovery rate<\/I><BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Value = 0.1<\/FONT>>,label=\"\", tooltip = \"Constant: Recovery rate\\nName: recovery_rate\\nValue: 0.1\"]\n\t\"total_population\" [id=\"total_population\",fillcolor=\"#E5E5E5\",xlabel=<<I>Total population<\/I><BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Value = susceptible +<BR/>infected + recovered<\/FONT>>,label=\"\", tooltip = \"Constant: Total population\\nName: total_population\\nValue: susceptible + infected + recovered\"]\n\n      # Define flow edges (stock -> flow_node)\n      edge [style = \"\", arrowhead=\"none\", penwidth=1.1, minlen=1, tailport=\"e\", headport=\"w\"]\n      \"susceptible\" -> \"new_infections\" [color=\"black:#F48153:black\"]\n\t\"infected\" -> \"new_recoveries\" [color=\"black:#F48153:black\"]\n\n      # Define flow edges (flow_node -> stock)\n      edge [style = \"\", arrowhead=\"normal\", arrowsize=1.5, penwidth=1.1, minlen=1, tailport=\"e\", headport=\"w\"]\n      \"new_infections\" -> \"infected\" [color=\"black:#F48153:black\"]\n\t\"new_recoveries\" -> \"recovered\" [color=\"black:#F48153:black\"]\n\n      # Define dependency edges\n      edge [style = \"\", color=\"#999999\", arrowhead=\"open\", arrowsize=0.8, penwidth=1, constraint=false, tailport = \"_\", headport=\"_\"]\n      \"infection_rate\" -> \"new_infections\"\n\t\"susceptible\" -> \"new_infections\" [headport = \"n\", tailport = \"n\"]\n\t\"infected\" -> \"new_infections\" [headport = \"s\", tailport = \"s\"]\n\t\"recovery_rate\" -> \"new_recoveries\"\n\t\"infected\" -> \"new_recoveries\" [headport = \"n\", tailport = \"n\"]\n\t\"contact_rate\" -> \"infection_rate\"\n\t\"total_population\" -> \"infection_rate\"\n\t\"susceptible\" -> \"total_population\"\n\t\"infected\" -> \"total_population\"\n\t\"recovered\" -> \"total_population\"\n\n      \n\n\n      # Rank groupings\n            {rank=same; \"contact_rate\"; \"infection_rate\" }\n      {rank=same; \"infection_rate\"; \"new_infections\" }\n      {rank=same; \"recovery_rate\"; \"new_recoveries\" }\n      {rank=same; \"total_population\"; \"infection_rate\" }\n\n    }\n          "

# plot.stockflow() with show_tooltip = FALSE omits tooltips

    "\n    digraph sfm {\n\n      graph [layout = dot, rankdir = LR, center=true, outputorder=\"edgesfirst\", pad=0.1, nodesep=0.5, splines = true, concentrate = false]\n\n      # Shared across all nodes (persists until overridden)\n      node [fontsize=18,fontname=\"stix-two-text\",fontcolor=\"black\"]\n\n      # Define stock nodes\n      node [shape=box,style=filled]\n      \"infected\" [id=\"infected\",fillcolor=\"#83D3D4\",label=<Infected<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 1<\/FONT>>]\n\t\"recovered\" [id=\"recovered\",fillcolor=\"#83D3D4\",label=<Recovered<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 0<\/FONT>>]\n\t\"susceptible\" [id=\"susceptible\",fillcolor=\"#83D3D4\",label=<Susceptible<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Initial value = 99999<\/FONT>>]\n\n      # Define flow nodes (intermediate nodes for flows)\n      node [style = \"\",shape=plaintext, fontsize=16, width=0.6, height=0.3]\n      \"new_infections\" [id=\"new_infections\",label=<New infections<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Rate = infection_rate<BR/>* susceptible *<BR/>infected<\/FONT>>]\n\t\"new_recoveries\" [id=\"new_recoveries\",label=<New recoveries<BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Rate = recovery_rate *<BR/>infected<\/FONT>>]\n\n      # Define external cloud nodes\n      \n      \n\n      # Define auxiliary nodes\n      \n      \n\n      # Define constant nodes\n      node [shape=diamond,fontsize=16,width=0.15, height=0.15, fixedsize=true, style=filled]\n      \"contact_rate\" [id=\"contact_rate\",fillcolor=\"#E5E5E5\",xlabel=<<I>Contact rate<\/I><BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Value = 2<\/FONT>>,label=\"\"]\n\t\"infection_rate\" [id=\"infection_rate\",fillcolor=\"#E5E5E5\",xlabel=<<I>Infection rate<\/I><BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Value = contact_rate /<BR/>total_population<\/FONT>>,label=\"\"]\n\t\"recovery_rate\" [id=\"recovery_rate\",fillcolor=\"#E5E5E5\",xlabel=<<I>Recovery rate<\/I><BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Value = 0.1<\/FONT>>,label=\"\"]\n\t\"total_population\" [id=\"total_population\",fillcolor=\"#E5E5E5\",xlabel=<<I>Total population<\/I><BR/><FONT POINT-SIZE=\"13\" COLOR=\"black\">Value = susceptible +<BR/>infected + recovered<\/FONT>>,label=\"\"]\n\n      # Define flow edges (stock -> flow_node)\n      edge [style = \"\", arrowhead=\"none\", penwidth=1.1, minlen=1, tailport=\"e\", headport=\"w\"]\n      \"susceptible\" -> \"new_infections\" [color=\"black:#F48153:black\"]\n\t\"infected\" -> \"new_recoveries\" [color=\"black:#F48153:black\"]\n\n      # Define flow edges (flow_node -> stock)\n      edge [style = \"\", arrowhead=\"normal\", arrowsize=1.5, penwidth=1.1, minlen=1, tailport=\"e\", headport=\"w\"]\n      \"new_infections\" -> \"infected\" [color=\"black:#F48153:black\"]\n\t\"new_recoveries\" -> \"recovered\" [color=\"black:#F48153:black\"]\n\n      # Define dependency edges\n      edge [style = \"\", color=\"#999999\", arrowhead=\"open\", arrowsize=0.8, penwidth=1, constraint=false, tailport = \"_\", headport=\"_\"]\n      \"infection_rate\" -> \"new_infections\"\n\t\"susceptible\" -> \"new_infections\" [headport = \"n\", tailport = \"n\"]\n\t\"infected\" -> \"new_infections\" [headport = \"s\", tailport = \"s\"]\n\t\"recovery_rate\" -> \"new_recoveries\"\n\t\"infected\" -> \"new_recoveries\" [headport = \"n\", tailport = \"n\"]\n\t\"contact_rate\" -> \"infection_rate\"\n\t\"total_population\" -> \"infection_rate\"\n\t\"susceptible\" -> \"total_population\"\n\t\"infected\" -> \"total_population\"\n\t\"recovered\" -> \"total_population\"\n\n      \n\n\n      # Rank groupings\n            {rank=same; \"contact_rate\"; \"infection_rate\" }\n      {rank=same; \"infection_rate\"; \"new_infections\" }\n      {rank=same; \"recovery_rate\"; \"new_recoveries\" }\n      {rank=same; \"total_population\"; \"infection_rate\" }\n\n    }\n          "

# plot() show_eqn uses font_color for the equation text

    "\n    digraph sfm {\n\n      graph [layout = dot, rankdir = LR, center=true, outputorder=\"edgesfirst\", pad=0.1, nodesep=0.5, splines = true, concentrate = false]\n\n      # Shared across all nodes (persists until overridden)\n      node [fontsize=18,fontname=\"stix-two-text\",fontcolor=\"#123456\"]\n\n      # Define stock nodes\n      node [shape=box,style=filled]\n      \"infected\" [id=\"infected\",fillcolor=\"#83D3D4\",label=<Infected<BR/><FONT POINT-SIZE=\"13\" COLOR=\"#123456\">Initial value = 1<\/FONT>>, tooltip = \"Stock: Infected\\nName: infected\\nInitial value: 1\\nInflows: New infections\\nOutflows: New recoveries\"]\n\t\"recovered\" [id=\"recovered\",fillcolor=\"#83D3D4\",label=<Recovered<BR/><FONT POINT-SIZE=\"13\" COLOR=\"#123456\">Initial value = 0<\/FONT>>, tooltip = \"Stock: Recovered\\nName: recovered\\nInitial value: 0\\nInflows: New recoveries\\nOutflows: —\"]\n\t\"susceptible\" [id=\"susceptible\",fillcolor=\"#83D3D4\",label=<Susceptible<BR/><FONT POINT-SIZE=\"13\" COLOR=\"#123456\">Initial value = 99999<\/FONT>>, tooltip = \"Stock: Susceptible\\nName: susceptible\\nInitial value: 99999\\nInflows: —\\nOutflows: New infections\"]\n\n      # Define flow nodes (intermediate nodes for flows)\n      node [style = \"\",shape=plaintext, fontsize=16, width=0.6, height=0.3]\n      \"new_infections\" [id=\"new_infections\",label=<New infections<BR/><FONT POINT-SIZE=\"13\" COLOR=\"#123456\">Rate = infection_rate<BR/>* susceptible *<BR/>infected<\/FONT>>, tooltip = \"Flow: New infections\\nName: new_infections\\nRate: infection_rate * susceptible * infected\\nFrom: Susceptible\\nTo: Infected\"]\n\t\"new_recoveries\" [id=\"new_recoveries\",label=<New recoveries<BR/><FONT POINT-SIZE=\"13\" COLOR=\"#123456\">Rate = recovery_rate *<BR/>infected<\/FONT>>, tooltip = \"Flow: New recoveries\\nName: new_recoveries\\nRate: recovery_rate * infected\\nFrom: Infected\\nTo: Recovered\"]\n\n      # Define external cloud nodes\n      \n      \n\n      # Define auxiliary nodes\n      \n      \n\n      # Define constant nodes\n      \n      \n\n      # Define flow edges (stock -> flow_node)\n      edge [style = \"\", arrowhead=\"none\", penwidth=1.1, minlen=1, tailport=\"e\", headport=\"w\"]\n      \"susceptible\" -> \"new_infections\" [color=\"black:#F48153:black\"]\n\t\"infected\" -> \"new_recoveries\" [color=\"black:#F48153:black\"]\n\n      # Define flow edges (flow_node -> stock)\n      edge [style = \"\", arrowhead=\"normal\", arrowsize=1.5, penwidth=1.1, minlen=1, tailport=\"e\", headport=\"w\"]\n      \"new_infections\" -> \"infected\" [color=\"black:#F48153:black\"]\n\t\"new_recoveries\" -> \"recovered\" [color=\"black:#F48153:black\"]\n\n      # Define dependency edges\n      edge [style = \"\", color=\"#999999\", arrowhead=\"open\", arrowsize=0.8, penwidth=1, constraint=false, tailport = \"_\", headport=\"_\"]\n      \"susceptible\" -> \"new_infections\" [headport = \"n\", tailport = \"n\"]\n\t\"infected\" -> \"new_infections\" [headport = \"s\", tailport = \"s\"]\n\t\"infected\" -> \"new_recoveries\" [headport = \"n\", tailport = \"n\"]\n\n      \n\n\n      # Rank groupings\n      \n\n    }\n          "

# plot() applies font_color to node fontcolor

    "\n    digraph sfm {\n\n      graph [layout = dot, rankdir = LR, center=true, outputorder=\"edgesfirst\", pad=0.1, nodesep=0.5, splines = true, concentrate = false]\n\n      # Shared across all nodes (persists until overridden)\n      node [fontsize=18,fontname=\"stix-two-text\",fontcolor=\"#654321\"]\n\n      # Define stock nodes\n      node [shape=box,style=filled]\n      \"infected\" [id=\"infected\",fillcolor=\"#83D3D4\",label=<Infected<BR/><FONT POINT-SIZE=\"13\" COLOR=\"#654321\">Initial value = 1<\/FONT>>, tooltip = \"Stock: Infected\\nName: infected\\nInitial value: 1\\nInflows: New infections\\nOutflows: New recoveries\"]\n\t\"recovered\" [id=\"recovered\",fillcolor=\"#83D3D4\",label=<Recovered<BR/><FONT POINT-SIZE=\"13\" COLOR=\"#654321\">Initial value = 0<\/FONT>>, tooltip = \"Stock: Recovered\\nName: recovered\\nInitial value: 0\\nInflows: New recoveries\\nOutflows: —\"]\n\t\"susceptible\" [id=\"susceptible\",fillcolor=\"#83D3D4\",label=<Susceptible<BR/><FONT POINT-SIZE=\"13\" COLOR=\"#654321\">Initial value = 99999<\/FONT>>, tooltip = \"Stock: Susceptible\\nName: susceptible\\nInitial value: 99999\\nInflows: —\\nOutflows: New infections\"]\n\n      # Define flow nodes (intermediate nodes for flows)\n      node [style = \"\",shape=plaintext, fontsize=16, width=0.6, height=0.3]\n      \"new_infections\" [id=\"new_infections\",label=<New infections<BR/><FONT POINT-SIZE=\"13\" COLOR=\"#654321\">Rate = infection_rate<BR/>* susceptible *<BR/>infected<\/FONT>>, tooltip = \"Flow: New infections\\nName: new_infections\\nRate: infection_rate * susceptible * infected\\nFrom: Susceptible\\nTo: Infected\"]\n\t\"new_recoveries\" [id=\"new_recoveries\",label=<New recoveries<BR/><FONT POINT-SIZE=\"13\" COLOR=\"#654321\">Rate = recovery_rate *<BR/>infected<\/FONT>>, tooltip = \"Flow: New recoveries\\nName: new_recoveries\\nRate: recovery_rate * infected\\nFrom: Infected\\nTo: Recovered\"]\n\n      # Define external cloud nodes\n      \n      \n\n      # Define auxiliary nodes\n      \n      \n\n      # Define constant nodes\n      \n      \n\n      # Define flow edges (stock -> flow_node)\n      edge [style = \"\", arrowhead=\"none\", penwidth=1.1, minlen=1, tailport=\"e\", headport=\"w\"]\n      \"susceptible\" -> \"new_infections\" [color=\"black:#F48153:black\"]\n\t\"infected\" -> \"new_recoveries\" [color=\"black:#F48153:black\"]\n\n      # Define flow edges (flow_node -> stock)\n      edge [style = \"\", arrowhead=\"normal\", arrowsize=1.5, penwidth=1.1, minlen=1, tailport=\"e\", headport=\"w\"]\n      \"new_infections\" -> \"infected\" [color=\"black:#F48153:black\"]\n\t\"new_recoveries\" -> \"recovered\" [color=\"black:#F48153:black\"]\n\n      # Define dependency edges\n      edge [style = \"\", color=\"#999999\", arrowhead=\"open\", arrowsize=0.8, penwidth=1, constraint=false, tailport = \"_\", headport=\"_\"]\n      \"susceptible\" -> \"new_infections\" [headport = \"n\", tailport = \"n\"]\n\t\"infected\" -> \"new_infections\" [headport = \"s\", tailport = \"s\"]\n\t\"infected\" -> \"new_recoveries\" [headport = \"n\", tailport = \"n\"]\n\n      \n\n\n      # Rank groupings\n      \n\n    }\n          "

