Comments (12)
so the error only occurs after the styling process?
from netwulf.
It does occur immediately when executing
wulf.visualize(tempToPlot)
(and it doesn't throw an error but just an empty canvas, as if you would have input an empty graph)
from netwulf.
weird, it works for me. I called
import netwulf as wulf
_, __, G = wulf.load("./matNetwork_error.txt")
wulf.visualize(G)
and I get the following result:
Which version of netwulf do you have installed? You can find out like this:
print(wulf.__version__)
from netwulf.
the current version is 0.1.4. In case you're not on the current version you can update it like this:
pip install --upgrade netwulf
from netwulf.
I am also on 0.1.4
I will try to create a minimal working example and then report back.
from netwulf.
when you said "(and it doesn't throw an error", does that mean you have checked the javascript console for error messages?
from netwulf.
Please find below a minimal working example:
## import things
import networkx as nx
import netwulf as wulf
## construct a small bipartite network
B = nx.Graph()
nodeSet0 = [1, 2, 3, 4]
B.add_nodes_from(nodeSet0, bipartite=0)
B.add_nodes_from(['a', 'b', 'c'], bipartite=1)
B.add_edges_from([(1, 'a'), (1, 'b'), (2, 'b'), (2, 'c'), (3, 'c'), (4, 'a')])
G=nx.projected_graph(B,nodeSet0)
## visualise the with netwulf (fails)
wulf.visualize(G)
## removing the `bipartite' node attribute
copyOfGraph = G.copy()
for node in copyOfGraph:
del copyOfGraph.node[node]['bipartite']
## Now it works
wulf.visualize(copyOfGraph)
The error message in the javascript console when it fails is
Uncaught TypeError: Cannot read property 'constructor' of undefined
at Xt (sweetalert2.all.min.js:1)
at restart_if_valid_JSON (vis.js:541)
at vis.js:437
at Object. (d3.v4.min.js:7)
at _.call (d3.v4.min.js:4)
at XMLHttpRequest.e (d3.v4.min.js:7)
As removing the node attributes fixes the problem it is not an urgent issue but I thought it should be documented somewhere in case other people run into the same problem.
Versions:
python 3.6.8
networkx 2.2
wulf 0.1.4
I am running it in an Anaconda Jupiter Notebook on a Mac.
from netwulf.
which browser?
from netwulf.
very weird, your code works on my machine for both python 3.6 and python 3.7 as well as both Chrome and Safari
from netwulf.
(thanks for raising the issue though, I heard from several people that they had problems, so this definitely helps)
from netwulf.
I just checked and the problem seems to occur only with Chrome. Firefox and Safari work without any problem!
from netwulf.
weird
from netwulf.
Related Issues (20)
- label position examples are deprecated in the docs
- visualization with initially given positions is unfrozen when node properties are changed
- When nodes are dragged, labels stay on for that node HOT 6
- Getting Dataset does not have a key 'nodes' HOT 3
- Highlight connected nodes and edges HOT 2
- Colouring nodes by property (e.g., degree) HOT 2
- Is netwulf available in anaconda? HOT 2
- ntwulf.visualize does not accept network as a dict HOT 5
- Netwulf changes the current working directory HOT 1
- Visualizing in google collab HOT 1
- Can't post visualization back to python HOT 2
- netwulf visualize ignores edge colors HOT 4
- Adding changes in CHANGELOG.md HOT 3
- is netwulf supports directed networkx ? HOT 4
- how to make .exe in Windows with pyinstaller and netwulf included [SOLVED] HOT 1
- some questions HOT 1
- Show edge labels
- nodes disappear when clicking on the nodes on a touchscreen HOT 2
- Canvas size ,self-loops ,large graphs? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netwulf.