Skip to content

[BUG] Fix nodes being cut-off around outside of conv graph plot #59

@WingCode

Description

@WingCode

Copied from qBraid/qBraid #851

In qbraid.visualization.plot_conversion_graph(), certain seeds can cause nodes to be partially or entirely cut off near the edges of the graph. For instance, in the example below, the "qubo" node in the top-left corner and the "cpp_pyqubo" node label in the bottom-right corner are clipped. To address this issue, we propose enhancing plot_conversion_graph to ensure that all nodes and their labels are fully visible within the plot boundaries. One solution could be some additional parameters passed to rx.spring_layout, which determines the placement of nodes in the graph layout. Other implementations/approaches are also possible.

from qbraid import ConversionGraph

graph = ConversionGraph(include_isolated=True)

graph.plot(seed=362, legend=True)

52f4331a-9cb3-4073-b109-1b31a7d32286

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions