Questions tagged [subgraph]

Use this tag for questions related to a Subgraph, a part of a larger graph.

313 questions
0
votes
2 answers

Remove automorphisms of a cypher query output

When doing a Cypher query to retrieve a specific subgraph with automorphisms, let's say MATCH (a)-[:X]-(b)-[:X]-(c), RETURN a, b, c It seems that the default behaviour is to return every retrieved subgraph and all their automorphisms. In that…
Alexis Pister
  • 449
  • 3
  • 13
0
votes
0 answers

Remove __typename for specific query

I am using @apollo/client and querying the graph protocol in my app. All of the queries are working well with the __typename except for the _meta query that's not using the __typename field. So I am getting this error from that query - Null value…
vhurryharry
  • 1,875
  • 1
  • 10
  • 28
0
votes
1 answer

gnuplot: How to align multiplots relative to axes coordinates?

From this question it turned out that in some cases it might be desirable to align a subplot relative to another's plot axes coordinates. If you check the gnuplot documentation, you will find that labels, arrows, objects (rectangles, polygons,…
theozh
  • 22,244
  • 5
  • 28
  • 72
0
votes
1 answer

Placement of nodes in a nested subgraph in Graphviz

I am trying to create a plot of a binary, coloring and marking different nodes in different colors. To get the borders around the subtrees I use subgraphs which works almost perfectly fine: graph G { graph [ranksep="0.25", nodesep="0.25"] rankdir =…
0
votes
1 answer

Get all subgraphs in JGraphT

How can I get all possible subgraphs of a graph in JGraphT in a List or Set collection? I've read the documentation of JGraphT, but I couldn't find anything to help me with that particular issue.
asajadi84
  • 410
  • 5
  • 20
0
votes
1 answer

R: Plot the famous "6 degrees of separation" (Kevin Bacon)

I am trying to write some R code that shows degrees of separation between friends. That is, suppose I pick the "node" with the arrow pointing towards it, and I say "degree = 3", I would like to be able to identify the following path in this…
user14644617
0
votes
1 answer

PostgreSQL SQL Query to return all graph nodes (the connected components), provided a node to query upon

In my Postgresql DB I have one or more directed acyclic graphs, represented by the following tables: Tables: nodes_table id edges_table id parent_id -- a nodes_table id child_id -- a nodes_table id Assuming I have the following…
djangomachine
  • 619
  • 4
  • 15
0
votes
0 answers

Find subgraphs that can only be reached by two nodes

I want to find subgraphs in a graph that are only connected to the rest of the graph by two nodes; for example, node A is connected to the rest of the graph, as well as node F, but nodes B-E are only connected to each other and A and F (don't have…
LizzAlice
  • 678
  • 7
  • 18
0
votes
1 answer

how to create a subgraph with jgrapht

I am using jgrapht in Java to work a network-based algorithm. I first read an adjacency list and then create jgrapht based graph. Now, given a subset of nodes called subNodes, I'd like to generate a sub graph. I am trying to use Subgraph class as…
whitepanda
  • 471
  • 2
  • 12
0
votes
1 answer

Compute induced subgraph with induction on paths, not edges

Consider a simple directed graph G = (V,E). A simple directed graph contains neither self-loops or multiple edges. Let us further assume that G consists of a single (weakly) connected component. Given a subset V' of V, I would like to create another…
0
votes
1 answer

Obtain the edges removed by using k-core in Networkx

I'm using Networkx's k-core to remove nodes of degree < 2. n=20 G = nx.gnm_random_graph(n=20, m=30, seed=1) nx.draw(G, with_labels=True) plt.show() retain_node_ids = [1, 8] G.add_edges_from([(u, v) for u in retain_node_ids for v in (n, n+1)]) pos =…
Natasha
  • 1,111
  • 5
  • 28
  • 66
0
votes
1 answer

Graphviz how to fix the x pos of clusters

Currently, I'm trying to fix the x Pos of clusters as they seem to move around creating a cluttered graph. All the sub-graph got rank=same and newrank=true. constraint value is set to true only for edges going from one cluster to another. Tried…
dragsu
  • 111
  • 1
  • 1
  • 10
0
votes
1 answer

gremlin python subgraph always empty

I use gremlin python to connect the gremlin server like this: g = traversal().withRemote(DriverRemoteConnection('ws://localhost:8182/gremlin', 'g')) But when I work with subgraph(referenced here…
Espada
  • 47
  • 6
0
votes
1 answer

Having a directed graph in pyhton (networkx), is it possible to create a subgraph according to a specific condition on the node attributes?

I have a twitter data set that i want to analyze,after creating a directed graph(the nodes are twitter users, and edge from a to b means a follows b) how i created the graph : I want to make a sub graph that contains only male users and edges…
0
votes
1 answer

Graphviz - how to position a subgraph's label at bottom?

In graphviz, by default a subgraph's label is placed at the top, like this: How do I place the label at the bottom instead please. I've tried the 'labeljust' attribute however the only options for this are l,r,c for left, right and…