igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] tkplot() - error message


From: Tamas Nepusz
Subject: Re: [igraph] tkplot() - error message
Date: Wed, 23 Sep 2009 19:42:40 +0100

Dear Diana,

First I'd try to normalize the layout matrix so that both the X and Y coordinates are within a reasonable range:

layout <- layout.norm(pub.mat, xmin=0, xmax=1, ymin=0, ymax=1)
tkplot(graph, layout=layout)

This probably won't look too good as the PubMed IDs and the years might be correlated (an article that's published later will have a higher PubMed ID, so the X and Y coordinates will be positively correlated). But I guess it's a good starting point.

--
Tamas

On 2009.09.23., at 16:05, Diana Neufeld wrote:

Dear Tamas, dear all,


thanks for your answer.
My matrix contains PubMedID’s in the first column and the ArticleDate in the second. So what I want is to get a graphic with a y-axis and vertices depends on time (ArticleDate). The additional information I have: publications and their references (data frame with two columns). How can I use this time-information to get a graph, whose vertices are not randomly placed on a
window opened by tkplot().
And if I rename my PubMedID’s in short notations, so it could work?

Thanks, Di.






-----Ursprüngliche Nachricht-----
Von: "Tamas Nepusz" <address@hidden>
Gesendet: 23.09.09 16:14:46
An: Help for igraph users <address@hidden>
Betreff: Re: [igraph] tkplot() - error message


Dear Diana,

tkplot(graph , layout=pub.mat)
[..]
pub.mat  is a matrix with two columns like this:

  pubMedID ArticleDate
12    53631           11
15   475066          14
The layout() argument of tkplot needs a graph layout; it is a matrix
with N rows and two columns, the first column containing the X
coordinate of the node on the plot, the second column containing the Y
coordinate. Your matrix does not look like a valid layout. igraph
tries to interpret it as a layout, so the PubMed IDs will be treated as
X coordinates, but they are too large.
What you will have to do is:

Either call tkplot() without the layout= option and set a layout from
the menu of the window opened by tkplot() -- you can also rearrange the
nodes by the mouse if you don't like the layout generated by igraph.
Alternatively, you can pre-calculate a layout using igraph's various
layout methods and pass the matrix obtained from the layout function. An
example:

layout <- layout.fruchterman.reingold(graph)
tkplot(graph, layout=layout)

Best,
--
Tamas


_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help



________________________________________________________________
Neu: WEB.DE Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://produkte.web.de/go/02/



_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help





reply via email to

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