Susan Biancani | 1 Jun 2012 09:17
Picon

Re: [igraph] problem saving to postscript file-- edges don't show up

Yes, you're right. In the first line I set some nodes to be semi-transparent. Changing that fixed the problem. Thank you!

On Wed, May 30, 2012 at 9:50 PM, Gábor Csárdi <csardi <at> rmki.kfki.hu> wrote:
On Thu, May 31, 2012 at 12:44 AM, Susan Biancani <inacnaib <at> gmail.com> wrote:
> I'm trying to save a plot of a graph as a postscript file, but when I open
> the file in Adobe Illustrator, it has no edges. I get a warning when I
> execute my code. Here are the code and the warning:
[...]
> E(g.art)$color <- rgb(red=0, green=0, blue=0, alpha=0.1)
[...]
> Warning message:
> In segments(x1, y1, x2 + r.seg * cos(th.seg)/uin[1], y2 + r.seg *  :
>   semi-transparency is not supported on this device: reported only once per
> page

Here is the problem. You cannot have semi-transparent edges in
postscript files. alpha must be 1 for the edge color. If you want some
kind of light grey color, set red, green and blue to (say) 0.8. If you
really want transparency, then create a PDF file instead, that
probably supports transparency. You can probably convert it to
postscript with keeping the transparent edges.

[...]
> Only the edges were semi-transparent, so I tried setting alpha=1 for the
> edges, but I get the same results. Has anyone dealt with something like this
> before?

If you really tried alpha=1, then something else is going on, but
could you try again with alpha=1, just to be sure.

Gabor

> Thanks,
> Susan
[...]

_______________________________________________
igraph-help mailing list
igraph-help-qX2TKyscuCcdnm+yROfE0A@public.gmane.org
https://lists.nongnu.org/mailman/listinfo/igraph-help

_______________________________________________
igraph-help mailing list
igraph-help@...
https://lists.nongnu.org/mailman/listinfo/igraph-help
Simone Gabbriellini | 5 Jun 2012 17:05
Picon
Gravatar

[igraph] near-decomposability

Hello List,

is there anything related to near-decomposability in igraph?

Best,
Simone

--

-- 
Dr. Simone Gabbriellini

DigitalBrains srl
Amministratore
Head R&D

mobile: +39 3403975626
mail: simone.gabbriellini@...
Gábor Csárdi | 6 Jun 2012 04:55
Picon
Gravatar

Re: [igraph] near-decomposability

Decomposability yes, and I don't know what near-decomposability is.

Gabor

On Tue, Jun 5, 2012 at 11:05 AM, Simone Gabbriellini
<simone.gabbriellini@...> wrote:
> Hello List,
>
> is there anything related to near-decomposability in igraph?
>
> Best,
> Simone
>
> --
> Dr. Simone Gabbriellini
>
> DigitalBrains srl
> Amministratore
> Head R&D
>
> mobile: +39 3403975626
> mail: simone.gabbriellini@...
>
> _______________________________________________
> igraph-help mailing list
> igraph-help@...
> https://lists.nongnu.org/mailman/listinfo/igraph-help

--

-- 
Gabor Csardi <csardi@...>     MTA KFKI RMKI
shahab | 7 Jun 2012 14:02
Picon

[igraph] Using power law distribution to generate a scale-free graph

Hi ,

My question is about generating a scale-free network (fat power law on
degrees). I know that there are are some generation functions to do
so.
But I have  problem which requires different treatment:
I have finite set of none connected directed edges. Juts consider an
edge-list like :
G=
n1,n2
n3,n4
n5,n6
.....
where the nodes are usually different, hence the resulting graph is
quite disconnected.
I have a probability  power-law  distribution function  to unify
(joint) some of the nodes.
Lets say using this function I find that n1 is unified by n3 , and n2
with n5,.... and so on... So I will have something like this
G'=
n1,n2
n2,n4
n5,n2
.....
Now knowing that I exploited a power distribution function to unify
some nodes, can I imply that  G'  is a scale-free graph and exposes a
power law distribution on node degrees?
Does anyone knows any related work in this light?

thanks,
/Shahab Mokarizadeh
PhD Student,
KTH University
Stockholm, Sweden,
http://www.isk.kth.se/~shahabm
Gábor Csárdi | 7 Jun 2012 16:54
Picon
Gravatar

Re: [igraph] Using power law distribution to generate a scale-free graph

Hi,

On Thu, Jun 7, 2012 at 8:02 AM, shahab <shahab.mokari@...> wrote:
[...]
> Now knowing that I exploited a power distribution function to unify
> some nodes, can I imply that  G'  is a scale-free graph and exposes a
> power law distribution on node degrees?

I am not sure what you mean by 'power distribution to unify'. Maybe
you can, but why don't you just do some simulations to check? (If
calculating it directly is difficult.)

G.

[...]
Roey Angel | 11 Jun 2012 16:36
Picon
Favicon
Gravatar

[igraph] extracting x y values from an igraph object to plot in ggplot

Hi,
I'd like to extract the x y values from an igraph object in order to 
plot it in ggplot (which accepts only data frames).
Scott Chamberlain has published an attempt to plot igraph networks in 
ggplot 
(http://schamberlain.github.com/2011/03/basic-ggplot2-network-graphs/) 
but he's just generating random values for the position of the vertices 
(through the vplace variable).
This works fine for small networks but makes a clutter in large networks 
and, most importantly, doesn't allow drawing different layouts.

The reason I'm insisting on ggplot (apart from the fact that this is 
what I know best in R graphics) is because I'd like to have the vertices 
sized according to a vector of numeric values and their colours 
according to a character vector and that's done very easly in ggplot.

I'm a beginner and trying to figure out my way in the world of networks 
and igraph so there might be something very basic I'm missing out here.

Thanks a lot in advance,
Roey

Attachment (angel.vcf): text/x-vcard, 133 bytes
_______________________________________________
igraph-help mailing list
igraph-help@...
https://lists.nongnu.org/mailman/listinfo/igraph-help
Gábor Csárdi | 11 Jun 2012 16:43
Picon
Gravatar

Re: [igraph] extracting x y values from an igraph object to plot in ggplot

Hi,

On Mon, Jun 11, 2012 at 10:36 AM, Roey Angel
<angel@...> wrote:
> Hi,
> I'd like to extract the x y values from an igraph object in order to plot it
> in ggplot (which accepts only data frames).

there are not x y values in igraph objects, at least not by default.

> Scott Chamberlain has published an attempt to plot igraph networks in ggplot
> (http://schamberlain.github.com/2011/03/basic-ggplot2-network-graphs/) but
> he's just generating random values for the position of the vertices (through
> the vplace variable).
> This works fine for small networks but makes a clutter in large networks
> and, most importantly, doesn't allow drawing different layouts.

You can generate layout coordinates by using one of the several layout
functions, e.g.
xy <- layout.fruchterman.reingold(mygraph)

> The reason I'm insisting on ggplot (apart from the fact that this is what I
> know best in R graphics) is because I'd like to have the vertices sized
> according to a vector of numeric values and their colours according to a
> character vector and that's done very easly in ggplot.

This is actually quite easy without ggplot as well:

G <- graph.ring(10)
plot(G, vertex.size=1:10*2, vertex.color=rainbow(10), layout=layout.circle)

Best,
Gabor

> I'm a beginner and trying to figure out my way in the world of networks and
> igraph so there might be something very basic I'm missing out here.
>
> Thanks a lot in advance,
> Roey
>
>
> _______________________________________________
> igraph-help mailing list
> igraph-help@...
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>

--

-- 
Gabor Csardi <csardi@...>     MTA KFKI RMKI
Roey Angel | 11 Jun 2012 17:06
Picon
Favicon
Gravatar

Re: [igraph] extracting x y values from an igraph object to plot in ggplot

Wow thanks for the rapid and very helpful reply, Gabor!
That's all I wanted to know.

Cheers,
Roey

On 06/11/2012 04:43 PM, Gábor Csárdi wrote:
> Hi,
>
> On Mon, Jun 11, 2012 at 10:36 AM, Roey
Angel<angel@...>  wrote:
>> Hi,
>> I'd like to extract the x y values from an igraph object in order to plot it
>> in ggplot (which accepts only data frames).
> there are not x y values in igraph objects, at least not by default.
>
>> Scott Chamberlain has published an attempt to plot igraph networks in ggplot
>> (http://schamberlain.github.com/2011/03/basic-ggplot2-network-graphs/) but
>> he's just generating random values for the position of the vertices (through
>> the vplace variable).
>> This works fine for small networks but makes a clutter in large networks
>> and, most importantly, doesn't allow drawing different layouts.
> You can generate layout coordinates by using one of the several layout
> functions, e.g.
> xy<- layout.fruchterman.reingold(mygraph)
>
>> The reason I'm insisting on ggplot (apart from the fact that this is what I
>> know best in R graphics) is because I'd like to have the vertices sized
>> according to a vector of numeric values and their colours according to a
>> character vector and that's done very easly in ggplot.
> This is actually quite easy without ggplot as well:
>
> G<- graph.ring(10)
> plot(G, vertex.size=1:10*2, vertex.color=rainbow(10), layout=layout.circle)
>
> Best,
> Gabor
>
>> I'm a beginner and trying to figure out my way in the world of networks and
>> igraph so there might be something very basic I'm missing out here.
>>
>> Thanks a lot in advance,
>> Roey
>>
>>
>> _______________________________________________
>> igraph-help mailing list
>> igraph-help@...
>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>>
>
>
Attachment (angel.vcf): text/x-vcard, 133 bytes
_______________________________________________
igraph-help mailing list
igraph-help@...
https://lists.nongnu.org/mailman/listinfo/igraph-help
Picon
Gravatar

Re: [igraph] extracting x y values from an igraph object to plot in ggplot

Hi,

You can also use my code for plotting network with ggplot2
http://www.kaduk.net/~mateusz/wp-content/uploads/2012/06/GGNetwork.zip

Example:

source('GGNetwork.R')
graph = graph.formula(A-B-C-D-E)
V(graph)$group = rainbow(vcount(graph))
E(graph)$weight = round(rnorm(nrow(get.edgelist(graph))),digits=2)
# Once you have igraph graph object with weight and group attributes
ggnetwork(graph, layout.circle(graph))

On 11 June 2012 17:06, Roey Angel <angel-QidqKpz2+uDjtQW52tizGYQuADTiUCJX@public.gmane.org> wrote:
Wow thanks for the rapid and very helpful reply, Gabor!
That's all I wanted to know.

Cheers,
Roey


On 06/11/2012 04:43 PM, Gábor Csárdi wrote:
Hi,

On Mon, Jun 11, 2012 at 10:36 AM, Roey Angel<angel-QidqKpz2+uDjtQW52tizGYQuADTiUCJX@public.gmane.org>  wrote:
Hi,
I'd like to extract the x y values from an igraph object in order to plot it
in ggplot (which accepts only data frames).
there are not x y values in igraph objects, at least not by default.

Scott Chamberlain has published an attempt to plot igraph networks in ggplot
(http://schamberlain.github.com/2011/03/basic-ggplot2-network-graphs/) but
he's just generating random values for the position of the vertices (through
the vplace variable).
This works fine for small networks but makes a clutter in large networks
and, most importantly, doesn't allow drawing different layouts.
You can generate layout coordinates by using one of the several layout
functions, e.g.
xy<- layout.fruchterman.reingold(mygraph)

The reason I'm insisting on ggplot (apart from the fact that this is what I
know best in R graphics) is because I'd like to have the vertices sized
according to a vector of numeric values and their colours according to a
character vector and that's done very easly in ggplot.
This is actually quite easy without ggplot as well:

G<- graph.ring(10)
plot(G, vertex.size=1:10*2, vertex.color=rainbow(10), layout=layout.circle)

Best,
Gabor

I'm a beginner and trying to figure out my way in the world of networks and
igraph so there might be something very basic I'm missing out here.

Thanks a lot in advance,
Roey

_______________________________________________
igraph-help mailing list
igraph-help@...
https://lists.nongnu.org/mailman/listinfo/igraph-help
shahab | 12 Jun 2012 10:55
Picon

Re: [igraph] Using power law distribution to generate a scale-free graph

Thanks Gabor for the point.  But I am mostly looking  for a
theoretical foundation , an analytically supported proof.
I appreciate if you point me to related work in this direction.

best,
/Shahab

On Thu, Jun 7, 2012 at 4:54 PM, Gábor Csárdi <csardi@...> wrote:
> Hi,
>
> On Thu, Jun 7, 2012 at 8:02 AM, shahab <shahab.mokari@...> wrote:
> [...]
>> Now knowing that I exploited a power distribution function to unify
>> some nodes, can I imply that  G'  is a scale-free graph and exposes a
>> power law distribution on node degrees?
>
> I am not sure what you mean by 'power distribution to unify'. Maybe
> you can, but why don't you just do some simulations to check? (If
> calculating it directly is difficult.)
>
> G.
>
> [...]
>
> _______________________________________________
> igraph-help mailing list
> igraph-help@...
> https://lists.nongnu.org/mailman/listinfo/igraph-help

Gmane