|
From: | Hermann Norpois |
Subject: | Re: [igraph] plot.igraph and x-axis |
Date: | Wed, 27 Nov 2013 17:43:33 +0100 |
On Tue, Nov 26, 2013 at 10:26 AM, Hermann Norpois <address@hidden> wrote:You also need to set the xlim and ylim parameters, because that also
> I am sorry I did not get it.
> If I use rescale=FALSE my plot is empty.
defaults to (-1,1).
No, that's not possible. Rescale the layout for yourself, and then set
> Actually I would like to change the rescale parameters. Is that possible,
> i.e.
> rescaleparameters = V(gs)$x
these limits in xlim and ylim.
Btw. if you include code this way, that is somewhat a pain to try,
because the > prompt makes it impossible to copy and paste. It is best
to include some code that we can just copy and paste into R, without
needing to edit it in emacs.
G.
> My try:
> plot (gs, vertex.size=2, vertex.label=NA,rescale=FALSE, edge.width=
> (E(gs)$weight)^6, layout=cbind (V(gs)$x, V(gs)$y))
>
>> dput (gs)
> structure(list(2, FALSE, 1, 0, 0, 0, c(0, 0, 1), c(0, 1, 1),
> list(c(1, 0, 1), structure(list(), .Names = character(0)),
> structure(list(name = c("rs744016", "rs763273"), x = c(27042106L,
> 27043594L), y = c(0.6445235948615, 0.6229189950958)), .Names =
> c("name",
> "x", "y")), structure(list(weight = 0.986597, y = 0.7704755,
> color = "red"), .Names = c("weight", "y", "color"
> )))), class = "igraph")
>> class (gs)
> [1] "igraph"
>> plot (gs, vertex.size=2, vertex.label=NA,rescale=FALSE, edge.width=
>> (E(gs)$weight)^6, layout=cbind (V(gs)$x, V(gs)$y))
>> axis (1, at=1:10) # Does not change anything.
>> plot (gs, vertex.size=2, vertex.label=NA, edge.width= (E(gs)$weight)^6,
>> layout=cbind (V(gs)$x, V(gs)$y))
>>
>
>
> 2013/11/26 Gábor Csárdi <address@hidden>
>>
>> Hi,
>>
>> no, this is an igraph thing, igraph rescales layouts to (-1, 1),
>> unless you specify the rescale=FALSE:
>>
>> http://igraph.sourceforge.net/doc/R/plot.common.html
>>
>> Gabor
>>
>> On Tue, Nov 26, 2013 at 9:53 AM, Hermann Norpois <address@hidden>
>> wrote:
>> > Hello,
>> >
>> > I want to have an x-axis with x-values refering to V(g)$x.
>> >
>> > How does this work?
>> >
>> > I tried
>> > axis (1, at=V(g)$x) without an effect.
>> >
>> > dput (axis (1)) has the following output:
>> > c(-1, -0.5, 0, 0.5, 1)
>> >
>> > How can I change this? I guess it is more a classical R-question ...
>> >
>> > thanks
>> > Hermann
>> >
>> >
>> > _______________________________________________
>> > igraph-help mailing list
>> > address@hidden
>> > https://lists.nongnu.org/mailman/listinfo/igraph-help
>> >
>>
>> _______________________________________________
>> igraph-help mailing list
>> address@hidden
>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help
plot1.png
Description: PNG image
plot2.png
Description: PNG image
[Prev in Thread] | Current Thread | [Next in Thread] |