-
Notifications
You must be signed in to change notification settings - Fork 5
Support to change colors and label nodes #7
Comments
I guess since you're using ThreeJS under the hood, it would make sense to abstract out the color options and such from there to your package too. |
I haven't added that functionality yet. I'll try to implement that by tonight. |
Awesome, thanks. It would also be nice to modify the defaults (or allow me to do that) so the graph looks a lot more beautiful. |
I'll be happy to have your contributions here. plot() function in utils.py is what draws the graph using ThreeJS. |
What might be interesting is to be able to change the points from tiny little squares to small coloured circles, and to increase the thickness of the edges a touch. That might make it look a bit more professional. |
@ranjanan I've implemented the node color change feature. You can use the drawGraph function to draw nodes with colors now. Like,
I've changed drawGraph function such that it accepts kwargs now. About the squares, currently they are points drawn using the |
Thanks, @abhijithanilkumar. The coloring works on nodes. Is there an equivalent way to color edges? If some of those aforementioned customization features can be included, I think it would be great for the package. |
Hi @ranjanan, I'll look into the circles thing. ThreeJS does let you change colors of lines and also sizes of the squares. @abhijithanilkumar, you can go ahead and add those features even now! Also is it time to make a type to represent the Graph visualization with the Graph and the customizable parameters as attributes? |
@rohitvarkey Creating a new type is a good idea. It will help us modify the graph more easily. I'll look into it. Thanks for the suggestion. |
Guys, any updates on changing the colors of the edges and sizes of the squares? @rohitvarkey does changing squares to circles look possible? |
I'm planning to restructure the library according to @rohitvarkey 's suggestion. Once that is done, changes can be made easily. I'll complete the work soon. |
@ranjanan @abhijithanilkumar I've just pushed the fix to ThreeJS to render points as circles in rohitvarkey/ThreeJS.jl#26. Just waiting on AppVeyor(:snail:) to complete to merge. |
Could you point me to functions that can help me change colors of nodes and label them too?
Something like
changeColor(g::Graph, n::Integer, color)
andsetLabel(g::Graph, n::Integer, text)
would be nice.cc: @rohitvarkey
The text was updated successfully, but these errors were encountered: