cosminbasca / asciinet

wrapper over the ascii-graphs library for printing networkx graphs as ASCII.
Apache License 2.0
23 stars 5 forks source link

Unconnected graphs are not drawn #3

Open teake opened 5 years ago

teake commented 5 years ago

Hi,

Thanks for the nice library! I did find one issue though: graphs with only unconnected vertices are not drawn. The simplest case (below) yields ''. Graphs with both connected and unconnected vertices do get drawn ok though.

import networkx as nx
from asciinet import graph_to_ascii

G = nx.Graph()
G.add_node(1)
assert graph_to_ascii(G) != ''