Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
G
graphviz
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 696
    • Issues 696
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 19
    • Merge Requests 19
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • graphviz
  • graphviz
  • Issues
  • #1897

Closed
Open
Opened Dec 03, 2020 by Gary Wilson@gary.wilson1

node and subgraph not center-aligned when connected to subgraph with node breadth of two

Steps to reproduce

digraph G {
    subgraph cluster_1 {
        a;
    }
    subgraph cluster_2 {
        b -> c1;
        b -> c2;
    }
    a -> b;
}
dot -O -Tpng first_node_in_cluster_causes_left_align.dot

first_node_in_cluster_causes_left_align.dot

Expected Behaviour

Nodes a and b are centered between c1 and c2, i.e. rendered the same as these variations:

  • Still two subgraphs, but three leaf nodes instead of two.
    • Input
      digraph G {
          subgraph cluster_1 {
              a;
          }
          subgraph cluster_2 {
              b -> c1;
              b -> c2;
              b -> c3;
          }
          a -> b;
      }
    • Output first_node_in_cluster_three_leaf_nodes.dot
  • Two leaf nodes, but first node not in a subgraph.
    • Input
      digraph G {
          subgraph cluster_2 {
              b -> c1;
              b -> c2;
          }
          a -> b;
      }
    • Output first_node_no_cluster_is_centered.dot
  • Two leaf nodes, but only first node in a subgraph.
    • Input
      digraph G {
          subgraph cluster_1 {
              a;
          }
          a -> b;
          b -> c1;
          b -> c2;
      }
    • Output first_node_cluster_others_not.dot

Actual Behaviour

Nodes a and b are left-aligned with c1.

OS Version

Ubuntu 20.04

Graphviz Version

dot - graphviz version 2.43.0 (0)

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: graphviz/graphviz#1897