Skip to content

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.

Increasing the default X-axis spacing for flow plotting (#2967)

Mike Plachta02912a653e8d
diff --git a/src/crewai/flow/visualization_utils.py b/src/crewai/flow/visualization_utils.py
index 781677276..202fb12d8 100644
--- a/src/crewai/flow/visualization_utils.py
+++ b/src/crewai/flow/visualization_utils.py
@@ -17,7 +17,7 @@ Example
import ast
import inspect
-from typing import Any, Dict, List, Optional, Tuple, Union
+from typing import Any, Dict, List, Tuple, Union
from .utils import (
build_ancestor_dict,
@@ -140,7 +140,7 @@ def compute_positions(
flow: Any,
node_levels: Dict[str, int],
y_spacing: float = 150,
- x_spacing: float = 150
+ x_spacing: float = 300
) -> Dict[str, Tuple[float, float]]:
"""
Compute the (x, y) positions for each node in the flow graph.
@@ -154,7 +154,7 @@ def compute_positions(
y_spacing : float, optional
Vertical spacing between levels, by default 150.
x_spacing : float, optional
- Horizontal spacing between nodes, by default 150.
+ Horizontal spacing between nodes, by default 300.
Returns
-------