JuliaAnimators / Javis.jl

Julia Animations and Visualizations
https://juliaanimators.github.io/Javis.jl/stable/
MIT License
827 stars 51 forks source link

Implementing Graph Visualizations #41

Open TheCedarPrince opened 4 years ago

TheCedarPrince commented 4 years ago

After a discussion between @Wikunia and I, we realized that though Graphs would be amazing to implement, it is beyond the scope of the release of the first version of Javis. Some notes from our conversation before I forget:

  • Graphs are extremely difficult to visualize but yeah we should have something that works on small graphs
  • I think it's preferred to not define our own graph structure though. Have a look at: https://github.com/JuliaGraphs/LightGraphs.jl instead and think only about how one can visualize them
  • Maybe https://juliagraphs.org/LightGraphs.jl/stable/plotting/ is interesting
  • The difficulty comes from deciding the layout such that there are not that many overlapping edges etc
  • We might want to start with a way to let the user fully specify the layout instead of an automatic version (@Wikunia , could you explain this thought a bit more before we forget the conversation? Thanks!)

Right now, this issue will not be worked on but we hope to someday.

TheCedarPrince commented 4 years ago

Hey @Wikunia, graphs may still be out of the scope of this project for a v0.2.0 release as I think it is probably more relevant/important to address issue #31 currently. However, I explored some more about what is possible with current graphing abilities in Julia - especially regarding LightGraphs.jl.

Here is what I have found out so far:

  1. GraphPlot.jl is a wonderful graphing tool that integrates closely with LightGraphs.jl. Furthermore, apparently, GraphLayout.jl has been deprecated in favor of GraphPlot.jl as of May 2020. Better yet, apparently, the tool allows a user to save to svg file formats which is fantastic for us! I think that enables us to apply animations to generated graphs if I am not mistaken...

  2. Due to the heavy interoperability LightGraphs.jl has with other Graph ecosystems, I sincerely believe that this library is most likely the best to use for Javis.jl. My thought here about incorporating the package into Javis.jl would be the following:

    1. Import the LightGraphs Types (especially the Concrete and AbstractGraph types) into Javis to ensure interop. Further, this would take reduce our responsibility in dealing with graphs and keep us separate from LightGraphs core dev.
    2. Smartly handling Graph objects in Javis.jl I think could be something we reasonably provide. Obviously, we need more conversation about this but I could see us also using GraphPlot.jl for our handling of graph visualizations and animations.
  3. LightGraphs.jl was designed to be interoperable with other packages.

These are just some thoughts right now that I wanted to add in before I forgot.