igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] Graph Attributes


From: Domingo Vargas
Subject: [igraph] Graph Attributes
Date: Fri, 27 Feb 2009 09:22:16 +1930

Dear Igraphers

I have been working on a program that generates graphml files from various sources. As far as I have tested it, the XML structure seems to be right for node and edge representation. My problem is with the attributes and so far I haven't found a way to generate a file that R/Igraph could accept without warning messages.

The warning messages are the following:

a <- read.graph("/Users/dvar/Developments/t2graph/red.graphml",format="graphml")

There were 50 or more warnings (use warnings() to see the first 50)

> warnings()

1: In read.graph.graphml(file, ...) :
  At foreign-graphml.c:634 :unknown attribute key in GraphML file, ignoring attribute
2: In read.graph.graphml(file, ...) :
  At foreign-graphml.c:634 :unknown attribute key in GraphML file, ignoring attribute
3: In read.graph.graphml(file, ...) :

<SNIP>

Any advise would be gladly welcome.

Best Regards!!!

-dv

PD1. This is the file structure of the XML file:

<?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
<graph id="my first graph" edgedefault="undirected">
<key id="x" for="" attr.name="x" attr.type="float">
</key>
<key id="y" for="" attr.name="y" attr.type="float">
</key>
<key id="z" for="" attr.name="z" attr.type="float">
</key>
<key id="v_size" for="" attr.name="v_size" attr.type="float">
</key>
<key id="shape" for="" attr.name="shape" attr.type="string">
</key>
<key id="ic_color" for="" attr.name="ic_color" attr.type="string">
</key>
<key id="bc_color" for="" attr.name="bc_color" attr.type="string">
</key>
<key id="lc_color" for="" attr.name="lc_color" attr.type="string">
</key>
<key id="value" for="" attr.name="value" attr.type="float">
</key>
<key id="color" for="" attr.name="color" attr.type="string">
</key>
<key id="label" for="" attr.name="label" attr.type="string">
</key>
<key id="time" for="" attr.name="event time" attr.type="int">
</key>
<key id="s_time" for="" attr.name="start time" attr.type="int">
</key>
<key id="e_time" for="" attr.name="end time" attr.type="int">
</key>
<node id = "b">
<data key="x">2</data>
<data key="y">4</data>
<data key="z">6</data>
<data key="v_size">2</data>
<data key="shape">circle</data>
<data key="ic_color">red</data>
<data key="bc_color">green</data>
<data key="lc_color">blue</data>
<data key="s_time">1</data>
<data key="e_time">1</data>
</node>
<node id = "c">
<data key="x">3</data>
<data key="y">6</data>
<data key="z">9</data>
<data key="v_size">3</data>
<data key="shape">circle</data>
<data key="ic_color">red</data>
<data key="bc_color">green</data>
<data key="lc_color">blue</data>
<data key="s_time">1</data>
<data key="e_time">1</data>
</node>
<node id = "m">
<data key="x">2</data>
<data key="y">4</data>
<data key="z">6</data>
<data key="v_size">2</data>
<data key="shape">circle</data>
<data key="ic_color">red</data>
<data key="bc_color">green</data>
<data key="lc_color">blue</data>
<data key="s_time">1</data>
<data key="e_time">1</data>
</node>
<node id = "d">
<data key="x">5</data>
<data key="y">10</data>
<data key="z">15</data>
<data key="v_size">4</data>
<data key="shape">circle</data>
<data key="ic_color">red</data>
<data key="bc_color">green</data>
<data key="lc_color">blue</data>
<data key="s_time">1</data>
<data key="e_time">1</data>
</node>
<edge id= "1" directed="false" source="b" target="c">
<data key="value">1</data>
<data key="color">yellow</data>
<data key="label">l1</data>
</edge>
<edge id= "2" directed="false" source="b" target="d">
<data key="value">1</data>
<data key="color">yellow</data>
<data key="label">l1</data>
</edge>
<edge id= "3" directed="false" source="b" target="b">
<data key="value">1</data>
<data key="color">yellow</data>
<data key="label">l2</data>
</edge>
<edge id= "4" directed="false" source="b" target="m">
<data key="value">1</data>
<data key="color">yellow</data>
<data key="label">l2</data>
</edge>
<edge id= "5" directed="false" source="c" target="d">
<data key="value">1</data>
<data key="color">yellow</data>
<data key="label">l1</data>
</edge>
<edge id= "6" directed="false" source="m" target="b">
<data key="value">1</data>
<data key="color">yellow</data>
<data key="label">l2</data>
</edge>
</graph>
</graphml>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]