mm2gv - Matrix Market-DOT converters


mm2gv [ -cluv? ] [ -ooutfile ] [ file ]


mm2gv converts a sparse matrix of the Matrix Market format to a graph in the GV (formerly DOT) format.


The following options are supported:
This flag causes mm2gv to assign colors to the edges. The matrix element is scaled to the range [0,1] depending on where it lies between the minimum and maximum set matrix values. This scaled value is used as the "wt" attribute of the corresponding edge. In addition, this scalar value is mapped to an RGB value, which is stored as the edge "color".
If set, mm2gv attaches a label to the graph indicating the base name of the input file, and the number of nodes and edges.
If specified, the graph is assumed to be undirected. By default, the graph generated is directed.
This flag causes mm2gv to store the matrix values as the "len" attribute of the corresponding edge.
Prints output to the file outfile. If not given, mm2gv uses stdout.


The following operand is supported:
Name of the file in MatrixMarket format. If no file operand is specified, the standard input will be used.


Return 0 if there were no problems during conversion; and non-zero if any error occurred.


Yifan Hu <yifanhu [at]>
Emden R. Gansner <erg [at]>


See for description of the format and for a large collection of sparse matrices in this format.