Coder Social home page Coder Social logo

Comments (7)

bhpayne avatar bhpayne commented on May 27, 2024

this is related to #70

from proofofconcept.

bhpayne avatar bhpayne commented on May 27, 2024

added a "linear index" float value to each step within a derivation; this could be leveraged for orientation in d3js

from proofofconcept.

bhpayne avatar bhpayne commented on May 27, 2024

In graphviz, pin node that has the lowest "linear index" to the top of the graph. If necessary, pin the highest "linear index" to the bottom of the graph.

https://stackoverflow.com/questions/8309201/graphviz-fixed-node-positions

https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:pin

https://observablehq.com/@magjac/placing-graphviz-nodes-in-fixed-positions

from proofofconcept.

bhpayne avatar bhpayne commented on May 27, 2024

Example derivations where this is relevant:

  • Euler equation proof

from proofofconcept.

bhpayne avatar bhpayne commented on May 27, 2024

In a large graph I added a single pos to one node

1337934 [shape=invtrapezium, color=blue, label="",image="/home/appuser/app/static/declareinitialexpr.png",labelloc=b, pos="0,0!"];

and then ran

neato -Tpng graphviz.dot -o newgraph.png

That didn't work, probably because neato wasn't looking for positions. I also tried an explicit pin,

1337934 [shape=invtrapezium, color=blue, label="",image="/home/appuser/app/static/declareinitialexpr.png",labelloc=b, pos="0,0!", pin=true];

but that didn't alter the layout. When I told neato to look for positions, I get an error because only one has pos

neato -n -Tpng graphviz.dot -o newgraph.png
    Error: node 5427510 in graph physicsDerivation has no position as required by the -n flag

Then I added pos="0,0" to all the other nodes. The neato -n worked but the graph was unreadable (and the one static 0,0! didn't seem to take effect).

from proofofconcept.

bhpayne avatar bhpayne commented on May 27, 2024

I can get node positions to change if I use non-negative coordinate values, e.g., pos="2,1!", pin=true

I pinned the first and last inference rules but the layout was not improved

from proofofconcept.

bhpayne avatar bhpayne commented on May 27, 2024

https://github.com/allofphysicsgraph/proofofconcept/tree/gh-pages/v7_pickle_web_interface/flask/from_freelancers/20200608_pinned_nodes_Evgeniy

3f5b75b

from proofofconcept.

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.