Hi!
I'm new to Gephi - why does the following filter setup fail?
I want to view just the edges from/to one node ID.
Mask edges doesn't work. However, the nested equal node id
filter alone works fine. Any ideas?
[SOLVED] Mask edges by node ID
- eduramiba
- Gephi Code Manager
- Posts:1064
- Joined:22 Mar 2010 15:30
- Location:Madrid, Spain [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Re: Mask edges by node ID
Hi,
I am not sure why this is happening but it looks like a bug.
As a workaround, you can for example place an intermediate a full range degree range filter that contains the Equal filter. This works for me.
Eduardo
I am not sure why this is happening but it looks like a bug.
As a workaround, you can for example place an intermediate a full range degree range filter that contains the Equal filter. This works for me.
Eduardo
-
- Posts:5
- Joined:13 Jan 2013 04:56
- Location:Berlin [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Re: Mask edges by node ID
yep, it does the job. Thanks!This works for me.
-
- Posts:1
- Joined:07 Oct 2013 12:38
- Location:United Kingdom [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Re: [SOLVED] Mask edges by node ID
I think I have just worked out a cleaner way to do it!
I don't think it's a bug. I think it's a feature for which I have not been able to find any documentation and therefore will be unable to explain it.
But, nonetheless, here's how it works. It seems that this way, the "Mask (Edges)" filter works as expected, including its "Source", "Target" etc. options.
1. Add the Mask filter (Operator -> Mask (Edges)). At this point, the filter filters out absolutely nothing at all.
2. Expand the Mask filter you added in (1) by clicking on the "+" sign and now add a sub-filter to it. The sub-filter you want to use is Equal (Id). This can be found in Attributes -> Equal -> ID (Node).
3. Expand the Equal (Id) filter you added in (2) and specify the id of the node you want the filter to apply to. For example, if I want to display only node "55.0" and all its incoming and outgoing edges, I would enter "55.0" - without the quotes, obviously!
If you look at the filter you have just created, you will have:
[filter] MASK (Edges)
[filter] Equal (Id)
[parameter] Parameters
Note the little filter and parameter icons next to the above! That's what I saw and thought that something was missing. So I did this.
4. With the Equal (Id) filter expanded (this was added in (2)), you will now see that you have an option to add a sub-filter. Now, add another Equal (Id) filter here via Attributes -> Equal -> ID (Node), just like you did in (2), and specify the same node id as you specified in (3) as a parameter to this filter.
The above method will show all of the specified node's edges, irrelevant of direction.
Now, if you would like only source (i.e. outgoing) or target (i.e. incoming) edges, you have to click on the "MASK (Edges)" filter and select a relevant radio box in its settings, displayed at the bottom.
Now, to hiding the rest of the nodes.
5. Create a separate INTERSECTION filter, in "Queries" as opposed to it being a sub-filter to something else, via Operator -> INTERSECTION.
6. Drag the MASK filter you created in (1) to the INTERSECTION filter's sub-filters section. So, the MASK becomes a sub-filter to the INTERSECTION. Collapse the MASK filter so that you don't add anything else to it by mistake.
7. Add an Ego Network filter as a sub-filter to the INTERSECTION filter, from Topology -> Ego Network. At this point, everything will most probably disappear from your view but don't panic.
8. Expand the Ego Network filter's parameters to edit them and specify your original node Id (55.0). Depth should be left at 1.
Now, there you go. Just one node, its neighbours and the relations of the node with its neighbours.
I hope it helps somebody because it was driving me mad for a day and a half now!
Oksana
I don't think it's a bug. I think it's a feature for which I have not been able to find any documentation and therefore will be unable to explain it.
But, nonetheless, here's how it works. It seems that this way, the "Mask (Edges)" filter works as expected, including its "Source", "Target" etc. options.
1. Add the Mask filter (Operator -> Mask (Edges)). At this point, the filter filters out absolutely nothing at all.
2. Expand the Mask filter you added in (1) by clicking on the "+" sign and now add a sub-filter to it. The sub-filter you want to use is Equal (Id). This can be found in Attributes -> Equal -> ID (Node).
3. Expand the Equal (Id) filter you added in (2) and specify the id of the node you want the filter to apply to. For example, if I want to display only node "55.0" and all its incoming and outgoing edges, I would enter "55.0" - without the quotes, obviously!
If you look at the filter you have just created, you will have:
[filter] MASK (Edges)
[filter] Equal (Id)
[parameter] Parameters
Note the little filter and parameter icons next to the above! That's what I saw and thought that something was missing. So I did this.
4. With the Equal (Id) filter expanded (this was added in (2)), you will now see that you have an option to add a sub-filter. Now, add another Equal (Id) filter here via Attributes -> Equal -> ID (Node), just like you did in (2), and specify the same node id as you specified in (3) as a parameter to this filter.
The above method will show all of the specified node's edges, irrelevant of direction.
Now, if you would like only source (i.e. outgoing) or target (i.e. incoming) edges, you have to click on the "MASK (Edges)" filter and select a relevant radio box in its settings, displayed at the bottom.
Now, to hiding the rest of the nodes.
5. Create a separate INTERSECTION filter, in "Queries" as opposed to it being a sub-filter to something else, via Operator -> INTERSECTION.
6. Drag the MASK filter you created in (1) to the INTERSECTION filter's sub-filters section. So, the MASK becomes a sub-filter to the INTERSECTION. Collapse the MASK filter so that you don't add anything else to it by mistake.
7. Add an Ego Network filter as a sub-filter to the INTERSECTION filter, from Topology -> Ego Network. At this point, everything will most probably disappear from your view but don't panic.
8. Expand the Ego Network filter's parameters to edit them and specify your original node Id (55.0). Depth should be left at 1.
Now, there you go. Just one node, its neighbours and the relations of the node with its neighbours.
I hope it helps somebody because it was driving me mad for a day and a half now!
Oksana