igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Igraph incidents


From: Gábor Csárdi
Subject: Re: [igraph] Igraph incidents
Date: Fri, 5 Oct 2012 13:30:56 -0400

On Fri, Oct 5, 2012 at 12:23 PM, Mike Dylan <address@hidden> wrote:
> Gabor:
>
> Thank you. I think I got the ide. first colum would be top vertex and second
> would be the impacted applications whers (edge vertex). I kind of getted
> working. but I like to see the top incident generated apps on top (if the
> layout is circle). How do you re-organize ghe graph so that what needs to be
> focused is on top etc.

The layout functions just return a two-column matrix with the
coordinates, and you can transform these in any way you want. E.g.

g <- graph.ring(10)
coords <- layout.circle(g)
plot(g, layout=coords)

You can rotate this by 90 degrees:

rad <- pi/2
center <- c(mean(range(coords[,1])), mean(range(coords[,2])))
phi <- atan2(coords[,2]-center[2], coords[,1]-center[1])
r   <- sqrt((coords[,1]-center[1])**2 + (coords[,2]-center[2])**2)

phi <- phi + rad

coords[,1] <- r * cos(phi)
coords[,2] <- r * sin(phi)
plot(g, layout=coords)

Gabor

> I did this:
>
> g <- graph.data.frame(tt)
> plot(g,  layout = layout.fruchterman.reingold,  vertex.label = V(g)$name,
> vertex.label.color= "black",  edge.arrow.size=1,  edge.curved=FALSE,
> edge.label=tt$count)
>
> thanks,
>
>
>
> On Thursday, October 4, 2012 12:54:41 PM UTC-4, Mike Dylan wrote:
>>
>> I have a data frame like this:
>>
>> Incident_ID               Application_Caused_Incident
>> Impacted_Systems
>> 11                           PeopleSoft
>> Financials
>> 11                           PeopleSoft
>> HR
>> 11                           PeopleSoft
>> PPM
>>
>> 12                           Web
>> Account_Receivable
>> 12                            Web
>> HR
>> 12                             Web
>> PPM
>>
>> 13                            PPM
>> HR
>>
>> I would like to create a igpaph chart that shows the application that
>> caused the problem and impacted systems in igprah format. I am very new to
>> igraph, can somebody start me with the above data frame?
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>



-- 
Gabor Csardi <address@hidden>     MTA KFKI RMKI



reply via email to

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