Comments (6)
In fact i have started working on it but we can coordinate or add different layouts
from rustworkx.
Has anyone been working on this already? If not I'll do it
from rustworkx.
My first response is that I would probably say for more complex algorithms we probably should just rely on graphviz. The drawer/layouts built into retworkx are more about convenience (so you don't need to install an external tool), I don't think we should expect to match the performance or ability of graphviz with a built-in drawer or layout function. We still will always have the to_dot
method to generate a dot file that we can pass to graphviz (a follow up to #304 I plan is to add a python function that wraps pydot
as an optional requirement to make it a bit easier to draw).
That being said though, it depends on the complexity and the effort you want to put into the function. If you want to make the improvements as part of #306 or in a follow up PR I think they would be fine to add, and definitely welcome additions. But they're not required, as long as we have a basic spring layout function for retworkx so we can use it for #304 I think that's all we actually require here.
from rustworkx.
For #306: I've been working on some other simpler layouts (4-5 layouts) so I didn't end up colliding with your work haha, but it seems we still wrote duplicate code (recenter/rescale, and some minor things). I guess I'll just keep mine unchanged and make a pull request when I finish, and we can sync after viewing each other's code.
from rustworkx.
Just a heads up I wrote a random_layout
function for #304 (since to get that working I needed a layout function and that looked like the simplest). I will eventually split that out into a separate PR (it's technically independent of the mpl drawer), I just pushed it up all together to show the PoC for the drawer. One thing we might want to share between all the layout implementations is the Pos2DLayout
custom return type in that, since it should be a lot more efficient to create than building a python dict.
I think once we have a spring layout function that should be the default we use in the matplotlib drawer.
from rustworkx.
Although there is still work to do in #306 , i'm wondering if it makes sense to implement some improvements in fruchterman reingold layout algorithm as described here. Specifically, we can use:
- Quad trees to efficiently (O(n logn) instead of O(n^2)) approximate repulsive forces
- A multilevel approach with a coarsening scheme.
Both are necessary for fast and nice layouts in large graphs. So, my question is if it's worth spending the time to implement it in retworkx or rely on dedicated tools like GraphViz (this algorithm is in sfdp
layout)
from rustworkx.
Related Issues (20)
- Move `lexicographical_topological_sort()` functionality to rustworkx-core HOT 2
- Move `collect_bicolor_runs()` functionality to rustworkx-core HOT 2
- Move `layers` functionality to rustworkx-core HOT 1
- Move dag longest path functions to rustworkx-core HOT 2
- rx.digraph_find_cycle() does not find the cycle in a graph HOT 7
- Improve the performance of the Katz Centrality computation.
- Weighted betweenness centrality HOT 1
- mpl_draw requires all keyword arguments to be specified to pass mypy HOT 3
- "single_source_all_shortest_paths" or "all_pairs_all_shortest_paths" function call
- QUESTION: are methods like dijkstra_shortest_path_lengths sorted? HOT 1
- Move `collect_runs()` functionality to rustworkx-core HOT 3
- SemVer HOT 2
- Investigate `QuaternaryHeap` for shortest-path and other functions HOT 1
- Expose extra options to control string escaping in dot file generation
- rustworkx crashes immediately on Python 3.13.0b3 HOT 7
- Problem type checking `ancestors()` with pyright HOT 3
- Incorrect Python stubs typing for node/edge attrs parameters in json serializers HOT 1
- Migrate PageRank and HITS implementations from `sprs` to `faer` HOT 1
- Update PyO3 to 0.22.x HOT 1
- Test `rustworkx` with free-threaded Python HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rustworkx.