Is there a way to draw a network (with nods and edges) in Julia? In particular, I have (say) 5 nodes of type 1 and 10 of type 2. Directed edges exist from each type 1 node to type 2 node, and I would probably show nodes of each type using different colors. For now, they can be located randomly on a 2D plane. Can a code be written using loops or something similar that would save me time to do this in PowerPoint etc.? Also, with a large number of nodes, I would want to automate it. Maybe there is a package that does this already. Any help is appreciated. Thanks!

Graphs.jl is a good package for constructing graphs. You can build them in various ways, by adding vertices and edges, from matrices, etc.

For drawing graphs, there are a number of packages that display graphs made with Graphs.jl:

- TikzGraphs.jl: backend: Tikz/Latex
- GraphPlot.jl: backend: Compose.jl
- SGtSNEpi.jl: backend: Makie.jl
- GraphRecipes.jl: backend: Plots.jl
- GraphMakie.jl: backend: Makie.jl
- Karnak.jl: backend: Luxor.jl

It might make sense to just export the network to one of the usual graph formats, like DOT or GML or GraphML (different from GML).

For example, DOT syntax originated with the venerable Unix (and crossplatform, nowadays) graph drawing tool: GraphViz. GraphViz is useful for 2D noninteractive drawing of graphs:

On the other hand, if you’re dealing with really large graphs you should check out the Graphia program, it accepts most of the standard graph formats (including the ones mentioned above), and it amazingly successfully visualizes *huge* networks in 3D, with a GUI and various options for customization and graph transformation. Interactively drawn networks with millions of nodes; with panning, zooming, etc. Graphia’s homepage and Github:

Thanks. I will take a look into these.

These are some amazing references. I will see which one works the best for me. Thanks a lot!