Skip to content

Commit e914399

Browse files
committed
update readme
1 parent 57a5f47 commit e914399

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,46 @@ If you find any bugs, please report it to us in [GitHub Issues](https://github.c
8686

8787
## Quick Start
8888

89+
### Visualization
90+
91+
You can draw the graph, hypergraph, directed graph, and bipartite graph with DHG's visualization tool. More details see the [Tutorial](https://deephypergraph.readthedocs.io/en/latest/tutorial/vis_structure.html)
92+
93+
<center>
94+
<img src="docs/source/_static/img/vis_graph.png" height="300">
95+
<img src="docs/source/_static/img/vis_hypergraph.png" height="300">
96+
</center>
97+
98+
```python
99+
import matplotlib.pyplot as plt
100+
import dhg
101+
# draw a graph
102+
g = dhg.random.graph_Gnm(10, 12)
103+
g.draw()
104+
# draw a hypergraph
105+
hg = dhg.random.hypergraph_Gnm(10, 8)
106+
hg.draw()
107+
# show figures
108+
plt.show()
109+
```
110+
111+
<center>
112+
<img src="docs/source/_static/img/vis_digraph.png" height="300">
113+
<img src="docs/source/_static/img/vis_bigraph.png" height="300">
114+
</center>
115+
116+
```python
117+
import matplotlib.pyplot as plt
118+
import dhg
119+
# draw a directed graph
120+
g = dhg.random.digraph_Gnm(12, 18)
121+
g.draw()
122+
# draw a bipartite graph
123+
g = dhg.random.bigraph_Gnm(30, 40, 20)
124+
g.draw()
125+
# show figures
126+
plt.show()
127+
```
128+
89129
### Learning on Low-Order Structures
90130

91131
On graph structures, you can smooth a given vertex features with GCN's Laplacian matrix by:

0 commit comments

Comments
 (0)