andreasarne / treeviz Goto Github PK
View Code? Open in Web Editor NEWRepo for visualizing tree datasctructures in Python. Is using iGraph and Graphviz to create pictures.
License: MIT License
Repo for visualizing tree datasctructures in Python. Is using iGraph and Graphviz to create pictures.
License: MIT License
Add proper error message when cant find dot graphviz for image creation.
Add a previous edge if previous attribute exist.
Current implementation of linked list builder will result in a forever loop if the structure is a circular list.
How to avoid a for ever loop from end to start? Can it be done or should we actively not support circular lists.
Is it possible to visualize recursive function calls using graphviz in a good way?
Could maybe create a decorator function which the students can add to their recursive function. Each time their function is called, create a .dot node.
In outer decorator function we can setup a new builder object for recursion. And everytime inner is called, add node to builder. Can inner be a instance method? Since it the the sudents function becomes the returned method, will it work correctly with the instance?
Add progression bar when creating gifs?
https://github.com/tqdm/tqdm
@recursion_viz
def a_func():
a_func()
recursion_to_png("a_func")
# index out of range error
If the decorated function isn't called before trying to render it. We get an IndexError.
Check that function was called and if not give indication about it.
It would be cool if we could create a .gif of how the structure is built.
For each "event"/node added, create a picture and then turn all of the pictures into a .gif.
Now it just say key already exist. Would be helpful if direction to and from was printed or adding it to graph but with unique name to show how it looks.
For BBT, if two vertexes has the same key but are two different vertexes they are shown as one vertex instead of 2 in image.
A students tree looked correct, however is_bst() returned false. After a remove the student forgot to update parent referens to new node. But the old and the new parent both had the same key so treevizer showed a correct tree instead of showing two vertexes with the same key.
Use the repr function to get the values used in the label.
Document that repr is used for deciding what to show.
Warning: node '', graph '%3' size too small for label
The size of the nodes in graph is to small for content. Increase width
of node in configuration.
os.system()
is deprecated and should be replaced with subprcess.run()
.
https://docs.python.org/3/library/subprocess.html?#replacing-older-functions-with-the-subprocess-module
https://github.com/AndreasArne/treeviz/blob/master/treevizer/exporters/png.py#L21
There is nothing in the code that makes BBT fulfill the balance part. It just as well can handle a Binary tree. Rename it to make that clear.
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.