-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plotlyviz #113
Plotlyviz #113
Conversation
Codecov Report
@@ Coverage Diff @@
## master #113 +/- ##
===========================================
- Coverage 90.76% 74.79% -15.97%
===========================================
Files 6 7 +1
Lines 433 619 +186
Branches 93 130 +37
===========================================
+ Hits 393 463 +70
- Misses 27 133 +106
- Partials 13 23 +10
Continue to review full report at Codecov.
|
I think this all looks really good. I'm going to put a little bit of work to polish it up and integrate it nicely. Below are a few lists of tasks I've done, tasks I'd like done, and tasks we should talk about. things I've changed
things I'd like to change before merging:
concerns that might warrant changes
|
…togram and node coloring lines up and apply black formatter
…y. not very customizable, but sane defaults
Hi @empet, Apologies for the delay. Would you mind taking a look at the most recent changes I've made to the notebooks and code? I think everything is working okay. I added a function that wraps most of the code built up in the notebooks so that for users who aren't as familiar with plotly can build the visuals with just one function being called. Let me know if it's okay, or please suggest changes. Thank you, |
Hi @sauln, |
Hey @empet! Thanks for all the work you put into making these visualizations. I am very excited to incorporate these. Sorry I have been moving slowly on this, but I think we're all ready to incorporate. Thank you again! 🍾 |
@empet I am reworking kmapper.py and visuals.py to decouple them from jinja and to refactor the color value calculation to be more customizable. In doing so, I noticed that plotlyviz.py reimplements portions of visuals.py and kmapper.py. Is this because jinja and html are tied into both kmapper.py and visuals.py? If so, once jinja is decoupled, I suspect that plotlyviz.py could be refactored to cut out a lot of duplicated code and logic, to make maintenance easier. WIth my refactor, visuals.py does all preparatory work separate from any html rendering. |
Specifically was looking at |
Hi @sauln and @MLWave,
Here is my new PR on including Plotly visualization for kmapper graphs.
I defined the file
plotlyviz.py
, that only makes a few imports fromvisuals
, and did not perform any change in the original kmapper files.In the folder
examples
I included a Jupyter notebook formakecircles
,cat
,digits
, andbreast-cancer
, as well as a pdf file for the Plotly figure representing the corresponding dataset.At the first inspection it is recommended to read the notebooks in the order given above, because each one illustrates more plotting capabilities, compared with the previous.
A notebook
Plotly-colorscale.ipynb
explains how we can convert matplotlib colormaps to Plotly colorscales, to color the graph nodes and the bars of histograms illustrating node distribution.In
README.md
are inserted details on how to installplotly
,ipywidgets
, andpython-igraph
.