GraphRecipes.jl

Graph-related recipes to be used with Plots.jl
Popularity
164 Stars
Updated Last
5 Months Ago
Started In
May 2016

GraphRecipes

The repository formerly known as PlotRecipes

Build Status Documentation project chat

Summary

In this repository, a graph is a network of connected nodes (although sometimes people use the same word to refer to a plot). If you want to do plotting, then use Plots.jl.

For a given graph, there are many legitimate ways to display and visualize the graph. However, some graph layouts will convey the structure of the underlying graph much more clearly than other layouts. GraphRecipes provides many options for producing graph layouts including (un)directed graphs, tree graphs and arc/chord diagrams. For each layout type the graphplot function will try to create a default layout that optimizes visual clarity. However, the user can tweak the default layout through a large number of powerful keyword arguments, see the documentation for more details and some examples.

Installation

] add GraphRecipes

An example

using GraphRecipes
using Plots

g = [0 1 1;
     1 0 1;
     1 1 0]

graphplot(g,
          x=[0,-1/tan/3),1/tan/3)], y=[1,0,0],
          nodeshape=:circle, nodesize=1.1,
          axis_buffer=0.6,
          curves=false,
          color=:black,
          nodecolor=[colorant"#389826",colorant"#CB3C33",colorant"#9558B2"],
          linewidth=10)

This repo maintains a collection of recipes for graph analysis, and is a reduced and refactored version of the previous PlotRecipes. It uses the powerful machinery of Plots and RecipesBase to turn simple transformations into flexible visualizations.

Original author: Thomas Breloff (@tbreloff)