Comments (6)
@NiRuff while it's technically possible to use edge_lw_by
in a matrix plot, I might suggest doing edge_alpha_by
instead. That might help a bit with the visualization, and it makes a bit more sense in this particular setting. The matrix plot is effectively a dot-matrix kind of plot; edge "width" would correspond to circle radius, but transparency is a better thing.
Perhaps something we should do here is to ensure that the dots actually have a border around them. What do you all think?
from nxviz.
I see what you mean, @NiRuff. Thanks for being patient here 😄.
The nature of large graphs means that the matrix would be difficult to visualize if you also wanted the transparency/lightness effect scaled by weight. I have a hunch you've hit the limits of what data visualization could do without considering the tradeoffs that need to happen.
The first I'd suggest is using panels of matrix plots rather than a single one. In this case, one plot to show clustering structure w/o showing weights, and another plot to show with weights. Put them side by side and you have a very effective data viz panel.
I believe there are two edge_kwargs that could help here, and you could use either one of them to start with. The first is the edge_alpha_scale kwarg, which lets you multiply the alpha (transparency) value by some scalar number across the board. The other is edge_alpha_bounds, which lets you set an upper-bound and lower-bound for transparency scaling. Those would result in visual inaccuracies but a more easily visualized single panel.
If I were in your shoes, though, I'd still use the first option. They make the data storytelling much easier.
from nxviz.
Hi @NiRuff, thank you for letting us know. I think this is a small bug. We'll fix it soon.
from nxviz.
Great, thanks a lot!
For all that are interested:
I uninstalled my current version of nxviz and then updated it using:
pip uninstall nxviz
pip install git+https://github.com/ericmjl/nxviz.git
When I ran the code like this it worked with drawing the edges with linewidth according to the Graph weights:
g = nv.arc(G, node_color_by="community", group_by="community", edge_lw_by="weight")
@AlirezaTheH: One more question: When having many groups with a lot of nodes the matrixPlot gets barely visible for me
Can I change the color scheme or make the black more prominent in the plot?
It looks like this e.g.:
from nxviz.
Thanks for the reply!
I used two versions ultimately: alpha and lw or just alpha. Unfortunately when having a lot of data the visibility is still poor.
Here the edge_alpha_by="weight" example:
Here having edge_alpha_by and edge_lw_by both set to "weight"
Unfortunately both are barely visible so I guess your suggestion might help here.
BTW: Thanks for reacting so fast all the time!
from nxviz.
Hi,
I was following along with Eric's scipy 2019 network analysis made simple tutorial and ran into this error message plotting the seventh grader network. Is this a related or new issue? (I saw what NiRuff said above and uninstall and reinstalled nxviz package but no change with the error.)
m = MatrixPlot(G)
m.draw()
TypeError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_19744/2627178271.py in
1 m = MatrixPlot(G)
----> 2 m.draw()
TypeError: draw() takes 0 positional arguments but 1 was given
Any help is appreciated! thanks!
from nxviz.
Related Issues (20)
- I have vertex.txt and triangle.txt, how to create a networkx graph? HOT 2
- Is it possible to make arcplot directional? HOT 2
- Downgrading pandas, matplotlib, networkx packages when installing nxviz HOT 4
- Broken example in new API documentation
- version mismatch on packages distributed by conda and pypi HOT 3
- Not an issue but a veli easy question
- Having trouble re-creating graph HOT 1
- Feature Request: Edge direction by source or target node colors. HOT 6
- Feature Request: Node label layout for circus plot HOT 2
- Changing the default node colors in Circosplot
- 'LinearSegmentedColormap' object has no attribute 'colors' with divergent network edges HOT 1
- draw() thakes 0 positional arguments but 1 was given HOT 6
- Module nxviz has no attribute 'annotate'
- Annotate node_colormapping legend_kwargs are not applied
- Error importing and executing Circosplot. HOT 1
- Matrix Plot Overlay Bug
- Customize node size and colormap in circosplot
- how show the node_labels on nxviz version:0.7.4 HOT 2
- ImportError: cannot import name 'CircosPlot' from 'nxviz.plots HOT 1
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 nxviz.