Giter VIP home page Giter VIP logo

Comments (2)

mdaines avatar mdaines commented on July 22, 2024

As far as I can tell, the output from Viz.js is consistent with the regular Graphviz program and library. That is, I get the same output when I try at least the first example using the dot command on my system. (The order of the cluster subgraphs affects the layout in the same way.)

always get the same result for a same set of nodes, edges and subgraphs

Can you say a bit more about your use case? I'm not sure this is possible without, say, sorting the input in some way.

The layout Graphviz chooses does depend on the order of the input. These graphs are the same in the sense that there are two nodes a and b with an edge between them, but they have different layout:

graph { a -- b }
graph { b -- a }

The same is true when using the Viz.js graph object feature. That just asks the Graphviz API to add nodes, edges, etc. to the graph in the order you provide.

Since this issue appears to be upstream of Viz.js, I suggest you ask about it on the Graphviz forum.

from viz-js.

Elora-V avatar Elora-V commented on July 22, 2024

Thank you for the answer. I also sent this issue to the graphViz github because I didn't know which was the most appropriate one to post this problem.

I want to obtain the coordinates of the nodes of a metabolic graph, with metabolites and reactions as nodes, and directed edges to connect them. In my program, I create clusters for the main reaction chains, which makes better drawing. So for a set of nodes (metabolic and reaction nodes), edges and clusters/subgraphs (main chains), I'd like to get the same graph to have a more robust code that doesn't depend on the order of the nodes in the input file, or the order in which my clusters are found.

from viz-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.