Up: Component summary Component


Converts a matrix or CSV representation of a graph to GraphML. The input can be an adjancency matrix (directed or undirected), incidence matrix of a Petri net or list of edges. Petri nets are always directed.

The GraphML may be formatted using GraphVisualizer.

Version 1.0
Bundle tools
Categories Graph
Authors Kristian Ovaska (kristian.ovaska@helsinki.fi)
Issue tracker View/Report issues
Requires igraph (R-package)
Source files component.xml CSV2GraphML.r
Usage Example with default values


Name Type Mandatory Description
in CSV Mandatory Matrix or CSV representation of a graph. The format depends on the "type" parameter. For adjancency matrices, element M[i,j] is nonzero if vertices i and j have an edge, and zero otherwise. If the graph is undirected, the matrix must be symmetric. The adjancency matrix must be square. For weighted graphs, M[i,j] gives the edge weight. For matrix type adjacency-labels, M[i,j] contains edge labels instead of weights. For Petri net incidence matrices, rows represent places and columns represent transitions. Edge lists consists of two columns. Each row has two nodes and an edge connecting these nodes. Additional columns are optional and their values are stored as edge attributes.


Name Type Description
out GraphML Output GraphML.


Name Type Default Description
adjType string "adjacency" Type of the input matrix. Legal values are "adjacency", "adjacency-labels", "incidence" (always directed) and "edgelist".
directed boolean true Is the graph directed or not. Some types are always directed/undirected.
edgeWeights boolean false If true, edge weights different from 1 are printed in edge labels.
maxEdgeWidth float 5 When the GraphML result is plotted using Graphviz (GraphVisualizer), this is the maximum edge line width in the graph. The value is in points. The minimum edge width is 1. Edge width is stored in the edge attribute "penwidth". Setting this parameter to 1 or less disables edge width computation.

Test cases

Test case Parameters IN
case1 properties in out


case2_weights properties in out


case3_adj (missing) in out
case4_adj_weights properties in out


case5_edgelist properties in out


case6_adj_labels properties in out


Generated 2019-02-08 07:42:14 by Anduril 2.0.0