parisneo / qgraphviz Goto Github PK
View Code? Open in Web Editor NEWA PyQT based GraphViz builder/renderer
License: MIT License
A PyQT based GraphViz builder/renderer
License: MIT License
Is there a way to convert a Graphviz object to a QGraphviz object?
Currently when I generate a large graph, some nodes fall out of the window. If a node goes out of the window I have no way to access it. Is there anyway to resize the graph as a whole or the length of the edges? I saw a parameter to change the width but not one for length. Or additionally is there a way to have the area the graph is generated in be scrollable? I tried putting the widget in a scrollable area but this didn't do anything.
Thanks
PyQt in my system doesn't cast float to int and I got errors. My proposition is to add hard casting.
The second problem is with node resizing. I set the size of node while creating and the sizes are changed when I clicked on node.
Hello,
I am having Issues to manipulate edges, is there a way to enhance the detection when the mouse is on the edges ?
Mainly when the arrows are in the horizontal positioning
I'm modifying the script in the example folder to add a second subgraph as well as add edges between the nodes in the subgraph, and I'm getting the following image. The nodes I add to the second subgraph seem to overwrite the first subgraph nodes, and when applying an edge to the nodes in the original subgraph one is booted out of the subgraph box (N12 should be inside, and Y subgraph should have nodes in it). I've named and labelled everything differently so I'm not sure why its not working. Any help would be greatly appreciated.
Here's a snippet of the code for reference. The main differences are the addition of sub_2, n11 and n12, and adding an edge between n11 and n12.
`qgv.setStyleSheet("background-color:white;")
qgv.new(Dot(Graph("Main_Graph"), show_subgraphs=show_subgraphs, font = QFont("Arial", 12),margins=[20,20]))
n1 = qgv.addNode(qgv.engine.graph, "Node1", label="N1", fillcolor="red")
n2 = qgv.addNode(qgv.engine.graph, "Node2", label="N2", fillcolor="blue:white:red")
n3 = qgv.addNode(qgv.engine.graph, "Node3", label="N3", shape = "diamond",fillcolor="orange")
n4 = qgv.addNode(qgv.engine.graph, "Node4", label="N4", shape="diamond",fillcolor="white")
n5 = qgv.addNode(qgv.engine.graph, "Node5", label="N5", shape="polygon", fillcolor="red", color="white")
n6 = qgv.addNode(qgv.engine.graph, "Node6", label="N6", shape="triangle", fillcolor="blue:white:red")
sub = qgv.addSubgraph(qgv.engine.graph, "sub graph", qgv.engine.graph.graph_type, label="y", fillcolor="blue:white:red")
n7 = qgv.addNode(sub, "Node7", label="N7")
n8 = qgv.addNode(sub, "Node8", label="N8")
icon_path = os.path.dirname(os.path.abspath(file)) + r"\icon\dbicon.png,100,100"
n9 = qgv.addNode(qgv.engine.graph, "Node9", label="N9", shape=icon_path)
icon_path = os.path.dirname(os.path.abspath(file)) + r"\icon\cam.png"
n10 = qgv.addNode(qgv.engine.graph, "Node10", label="\n\n\nN10\nTest multilines", shape=icon_path, color="white")
sub_2 = qgv.addSubgraph(qgv.engine.graph, "subgraph2", qgv.engine.graph.graph_type, label="x", fillcolor="blue:white:red")
n11 = qgv.addNode(sub_2, "Node_11", label="N11")
n12 = qgv.addNode(sub_2, "Node_12", label="N12")
qgv.addEdge(n1, n2, {})
qgv.addEdge(n3, n2, {})
qgv.addEdge(n2, n4, {"width":2})
qgv.addEdge(n4, n5, {"width":4})
qgv.addEdge(n4, n6, {"width":5,"color":"red"})
qgv.addEdge(n3, n6, {"width":2})
qgv.addEdge(n6, n9, {"width":5,"color":"red"})
qgv.addEdge(n9, n10, {"width":5,"color":"red"})
qgv.addEdge(n11, n12, {})`
Hello again! When I add a node to graph for some reason it gets sent to the far right way off screen. Do you have any idea why this might be happening? I didn't have this issue before, think it started happening when I updated the package. Thank you for all your help!
Hello I am looking for directed graph when linking 2 nodes.
Is there a way to have it ?
I have tried to set-up GraphType.DirectedGraph everywhere I can
Thanks in advance for your help
This is more of a feature request than an issue, but it'd be really cool if the positions of the nodes were saved in the json file as well. The dot engine doesn't create the most readable graphs sometimes. So if the user tweaked the graph manually and was able to save and then load in this updated graph later that'd be awesome. I'll take a look into the API and see if I can tweak it to make this work when I have some time. But thought I'd post this up in case you were already thinking about this or had some time to do it.
Thanks again!
Is it possible embed a diagram to PyQt5 GUI and change the colour of the edges and nodes dynamically?
https://pypi.org/project/QGraphViz/
Looked at setup.py, it looks fine... maybe there is an issue with the machine from which you build and upload the package to pypi ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.