Thanks,
this helped me understand how it could work:
plot(gg, layout=cbind(V(gg)$x, 0))
The x-position is great. Now I am looking for "reasonable" y-values. Reasonable for me means:
The plotted graph should look okay.The ideal y-values would be those that give the vertices
positions (my x-value and any y-value) so that the plotted graph is clearly arranged.
Is there an algorithm I should test?
Otherwise I will check if "reasonable" y-values might be produced by assigning for instance
the mean of the weights for each vertex.
By the way, how do I get all edges (or weights) of a vertix?
Thanks
Hermann
>I am not sure how exactly you want to plot them, but you can specify
>vertex positions directly in the 'layout' argument, in a two-column
>matrix for x and y coordinates. E.g.
>plot(gg, layout=cbind(V(gg)$x, 0))
>To read the labels, you'll probably need a very wide plot....
>G.
On Fri, Nov 15, 2013 at 4:13 PM, Hermann Norpois <address@hidden> wrote:
> Dear list,
>
> I wish to apologise for my first clumsy question. Second trial:
>
> I have an igraph object gg (see below) and I want the vertices being plotted
> in the order of x (that goes from 1 to 9) in reference to a x-axis.
> How do I create a x-axis and how can I plot my vertices in relation to this
> x-axis?
> Can you please give me a hint how this might work.
>
> I started with
>> plot (gg, edge.width=(E(g)$weight)^4)
>
> but I did not find a way to include any x-axis information.
>
> Thanks
> Hermann
>
>> dput (gg)
> structure(list(9, TRUE, c(0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1,
> 1, 1, 2, 2, 2, 2, 2, 2), c(1, 2, 3, 4, 5, 6, 0, 2, 3, 4, 5, 6,
> 7, 8, 0, 1, 3, 4, 5, 6), c(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
> 11, 12, 13, 14, 15, 16, 17, 18, 19), c(6, 14, 0, 15, 1, 7, 2,
> 8, 16, 3, 9, 17, 4, 10, 18, 5, 11, 19, 12, 13), c(0, 6, 14, 20,
> 20, 20, 20, 20, 20, 20), c(0, 2, 4, 6, 9, 12, 15, 18, 19, 20),
> list(c(1, 0, 1), structure(list(), .Names = character(0)),
> structure(list(name = c("rs4822747", "rs4820690", "rs5761627",
> "rs5752355", "rs4822748", "rs4820691", "rs4822749", "rs4822750",
> "rs5761629"), color = c("red", "red", "red", "red", "red",
> "red", "red", "red", "red"), x = 1:9), .Names = c("name",
> "color", "x")), structure(list(weight = c(0.78999, 0.695642,
> 0.687861, 0.682715, 0.695642, 0.695642, 0.695642, 1,
> 0.988681, 0.988655, 1, 1, 0.988655, 0.695642, 0.695642,
> 1, 0.988681, 0.988655, 1, 1)), .Names = "weight"))), class =
> "igraph")
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>