GraphPlot.jl icon indicating copy to clipboard operation
GraphPlot.jl copied to clipboard

Plot with MetaGraphs?

Open Roger-luo opened this issue 6 years ago • 3 comments

I'm wondering if we set the plot layouts, e.g vertices color, edge color with MetaGraphs, and then we will be able to use a single command gplot(g) to plot a graph.

But I didn't find any integration between these two packages, or there's some package I didn't notice?

Roger-luo avatar Mar 28 '19 20:03 Roger-luo

Hmm but would it make sense, that these things are by default mapped from a meta graph to a property for plotting? Wouldn't it be better to have that mapping explicitly?

Is there something equivalent in other julia package? For example are properties in data frames mapped to properties for plotting?

simonschoelly avatar May 16 '20 19:05 simonschoelly

The point is that the MetaGraphs package is the "standard" way to associate arbitrary metadata with a LightGraph — unlike a DataFrame, such metadata cannot be stored directly in the LightGraph. Things like node labels, colors, etcetera, are graph metadata, so it's natural to have a gplot(::MetaGraph) method that exploits this.

stevengj avatar Dec 31 '20 14:12 stevengj

the MetaGraphs package is the "standard" way to associate arbitrary metadata with a LightGraph

Except that there's now also MetaGraphsNext.jl that is intended to be a replacement for MetaGraphs. But I agree it would be nice to have native plotting support with attributes tied to the metadata.

Also, since v1, "LightGraph" doesn't really exist. There is just the LightGraphs API, a library that uses the API, and a collection of data structures that implement the API. It just so happens that a reference implementation, the SimpleGraph, is bundled with the library.

sbromberger avatar Dec 31 '20 14:12 sbromberger