| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
Update nx_pylab.py
|
| |
|
|
|
| |
* Keep the original order of the nodes in bipartite_layout
* Keep the original order of the nodes in bipartite_layout
|
| |
|
|
| |
Make sure the `"pos"` node attribute is properly formatted for pygraphviz,
if present.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lint and fix using ruff
* add flake8-pie lints
* remove useless import alias
* bump version
* bump deps
---------
Co-authored-by: daniel.eades <daniel.eades@hotmail.com>
|
| |
|
|
|
| |
* Update developer requirements
* Run linter
|
| |
|
|
|
| |
* provide tikz with degrees, not radians
* set default radius to 2
|
| |
|
| |
Minor formatting fixups to get rid of doc build warnings.
|
| |
|
|
|
| |
* Fix_Typos
* Commit_Suggestions
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implemented conversion from networkx graph to latex graph.
* Removed latex cache files uploaded by error.
* Resolved placeholders file import issue.
* Removed dependency to numpy
* Updated test
* Wrapped test for numpy dependency
* Updated test name
* format changes to nx_latex.py and friends.
vertex -> node, vertices -> nodes
PEP8 spacing and tabs
pytest function instead of class (class not needed here -- no imports)
Moved author info to CONTRIBUTORS.rst as our new standard
converted list comprehension done for side-effects to for-loop.
switch to f-strings from string-format calls
update setup.py to remove conflicts
* Remove numpy requirement for testing latex
Also pep8 formatting
* reorder imports in __init__
* Attempt to debug windows/appveyor adigraph error
* try again
* Remove types, run pre-commit
* blackify
* pyupgradify
* inline latex placeholders and expected_tex.
Check not multigraph.
Add example
Change variable name `file` to `latex_code`
inline if/else for __init__ setup
* Change tabs to spaces
* pull apart Adigraph to simplify interface
* remove class Adigraph completely in favor of functions
* replace default layout to be circular.
(matches adigraph and avoids using random seeds in tests
* fix old version of isort result
* update documentation and include with rst file. Update some tests
* make docs more complete, checked and add tests
* Cleanup extra file changes that aren't needed
* Add TikZ version of to_latex as default
* improve docs
* Make the networkx latex interface via TikZ and not adigraph
* fix rebase
* Apply suggestions from code review
Co-authored-by: Mridul Seth <mail@mriduls.com>
* comment out print statements in tests
* Turn off multigraph for latex
* Remove tests of `line width` and edge label placement
* add back line width style, fix placement of style on edges.
* Set default layout to have radius 10
Co-authored-by: Mridul Seth <mail@mriduls.com>
* fix docstring test
* Minor docstring formatting nits.
Co-authored-by: Luca Cappelletti <cappelletti.luca94@gmail.com>
Co-authored-by: Mridul Seth <seth.mridul@gmail.com>
Co-authored-by: Mridul Seth <git@mriduls.com>
Co-authored-by: Mridul Seth <mail@mriduls.com>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
| |
* doc: clarify allowed `alpha` when using nx.draw_networkx_edges
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
|
|
|
|
|
|
| |
(#6098)
* Add test for UserWarning with ignored vizopts.
* Implement UserWarning for bad vizopts combos.
* Fix instance in test suite caught by new warnings.
* Update test to check warnings are *not* raised when using FAPs.
|
| |
|
|
|
|
|
|
|
|
|
| |
* Use toarray instead of .A for sparse array conversion.
Missed this example in the test suite during the sparse
cleanup.
* Fix crosstalk of axis object between tests.
This now raises a dep warning for mpl 3.6 and will result in
explicit exceptions in the future.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* added arf_layout
* reference to docstring and comparison to spring layout
* rebase to origin main
* black re-format
* Left aligned docstring text
* Cleaned up computation and update variables to new docstring
* Updated naming tests. Added input check on arf_layout parameter `a`
* Fixed Linter issues for py38 target
* Fixed Linter issues for target p38
* linter issue fixed
|
| |
|
|
|
|
|
|
|
|
|
| |
* See matplotlb 3.6rc1 failure
* replace use of private class method to allow mpl v3.6 to work.
* ensure ax exists before calling colorbar
* Undo matplotlib pin
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
* Add more comprehensive tests for pydot
* remove the second element from frozenset for cleaner tests
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| | |
|
| |
|
|
|
| |
* Remove deprecated display_pygraphviz
* Remove display pygraphviz from deprecations file
|
| |
|
|
|
| |
* Add PendingDeprecation for pydot
* Link to tracking issue
|
| |
|
|
|
|
|
|
|
|
|
| |
* Add test for sorted layers.
* Implement layer sorting when possible.
Co-authored-by: Dan Schult <dschult@colgate.edu>
* Add test case for non-sortable layers.
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| |
|
|
| |
pydot has it's own mechanism to deal with quoting strings
we shouldn't try to change that.
|
| |
|
|
|
| |
* Add isort to pre-commit
* Run isort on all python files (except __init__.py ones)
|
| |
|
|
|
|
|
|
|
| |
* Remove redundant float conversion
* Remove redundant int conversion
* Use integer division
Co-authored-by: Miroslav Šedivý <6774676+eumiro@users.noreply.github.com>
|
| | |
|
| |
|
|
|
| |
This makes sure we don't miss the cases where we add a new
argument to a draw_networkx_* and not update the valid kwargs
in draw_networkx.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
* Change default value of arrowstyle for undirected graphs
* Update networkx/drawing/nx_pylab.py
Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com>
Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* added references
* added gallery example
* fixed error
* fixed error
* Update networkx/drawing/layout.py
Co-authored-by: Mridul Seth <mail@mriduls.com>
* Update networkx/drawing/layout.py
Co-authored-by: Mridul Seth <mail@mriduls.com>
* added example on edge cover
* Revert "added example on edge cover"
This reverts commit 27a7277622a45e361a60ddfc1b04b6b18acd6900.
* add a link break
Co-authored-by: Mridul Seth <mail@mriduls.com>
|
| |
|
|
|
|
|
|
|
| |
* added extra condition for fancy arrow colors
* keep fancy edges ids to get a correct prop's value
* Add test for selfloop color mapping in undirected graphs.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
|
|
| |
* CI: sync up black dev requirements version with precommit
* Run black
Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [nx_pylab] fix StopIteration, if empty dict is passed for labels.
The new detection for multi-edge labels raises, if an empty dict
was passed. Before this detection that was fine, because the loop
iterating over the passed labels just passed.
Added small test as well.
* incorporate suggestions [ci skip]
* Add regression test for empty edge label dict.
* Simplify dict lookup (keys only).
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
| |
Fixes positioning of first node when equidistant=True.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use pytest-mpl
* Try circleci
* New
* Fix
* Fix test
* Add documentation
* Install default requirments on Circle CI
* Install pytest on circle CI
* Update python image
* Test house w/ colors
Co-authored-by: Mridul Seth <mail@mriduls.com>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update descriptions, add Notes and SeeAlso sections.
Notify users that the draw_ fns are shorthand for using the layouts
explicitly.
* Fix gh-5215.
* Rm unused warnings.
* Rm >>> to prevent doctest from running.
* Fix planar layout example with planar graph.
* Fix links to layout functions (cross-module.
* Fix misnamed layout in example
Co-authored-by: Mridul Seth <mail@mriduls.com>
Co-authored-by: Mridul Seth <mail@mriduls.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Step 1: use sparse arrays in nx.to_scipy_sparse_matrix.
Seems like a reasonable place to start.
nx.to_scipy_sparse_matrix is one of the primary interfaces to
scipy.sparse from within NetworkX.
* 1: Use np.outer instead of mult col/row vectors
Fix two instances in modularitymatrix where a new 2D array was being
created via an outer product of two \"vectors\".
In the matrix case, this was a row vector \* a column vector. In the
array case this can be disambiguated by being explicit with np.outer.
* Update _transition_matrix in laplacianmatrix module
- A few instances of matrix multiplication operator
- Add np.newaxis + transpose to get shape right for broadcasting
- Explicitly convert e.g. sp.sparse.spdiags to a csr_array.
* Update directed_combinitorial_laplacian w/ sparse array.
- Wrap spdiags in csr_array and update matmul operators.
* Rm matrix-specific code from lgc and hmn modules
- Replace .A call with appropriate array semantics
- wrap sparse.diags in csr_array.
* Change hits to use sparse array semantics.
- Replace * with @
- Remove superfluous calls to flatten.
* Update sparse matrix usage in layout module.
- Simplify lil.getrowview call
- Wrap spdiags in csr_array.
* lil_matrix -> lil_array in graphmatrix.py.
* WIP: Start working on algebraic connectivity module.
* Incorporate auth mat varname feedback.
* Revert 1D slice and comment for 1D sparse future.
* Add TODOs: rm csr_array wrapper around spdiags etc.
* WIP: cleanup algebraicconn: tracemin_fiedler.
* Typo.
* Finish reviewing algebraicconnectivity.
* Convert bethe_hessian matrix to use sparse arrays.
* WIP: update laplacian.
Update undirected laplacian functions.
* WIP: laplacian - add comment about _transition_matrix return types.
* Finish laplacianmatrix review.
* Update attrmatrix.
* Switch to official laplacian function.
* Update pagerank to use sparse array.
* Switch bipartite matrix to sparse arrays.
* Check from_scipy_sparse_matrix works with arrays.
Modifies test suite.
* Apply changes from review.
* Fix failing docstring tests.
* Fix missing axis for in-place multiplication.
* Use scipy==1.8rc2
* Use matrix multiplication
* Fix PyPy CI
* [MRG] Create plot_subgraphs.py example (#5165)
* Create plot_subgraphs.py
https://github.com/networkx/networkx/issues/4220
* Update plot_subgraphs.py
black
* Update plot_subgraphs.py
lint plus font_size
* Update plot_subgraphs.py
added more plots
* Update plot_subgraphs.py
removed plots from the unit test and added comments
* Update plot_subgraphs.py
lint
* Update plot_subgraphs.py
typos fixed
* Update plot_subgraphs.py
added nodes to the plot of the edges removed that was commented out for whatever reason
* Update plot_subgraphs.py
revert the latest commit - the line was commented out for a reason - it's broken
* Update plot_subgraphs.py
fixed node color issue
* Update plot_subgraphs.py
format fix
* Update plot_subgraphs.py
forgot to draw the nodes... now fixed
* Fix sphinx warnings about heading length.
* Update examples/algorithms/plot_subgraphs.py
* Update examples/algorithms/plot_subgraphs.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Dan Schult <dschult@colgate.edu>
* Add traveling salesman problem to example gallery (#4874)
Adds an example of the using Christofides to solve the TSP problem to the example galery.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Fixed inconsistent documentation for nbunch parameter in DiGraph.edges() (#5037)
* Fixed inconsistent documentation for nbunch parameter in DiGraph.edges()
* Resolved Requested Changes
* Revert changes to degree docstrings.
* Update comments in example.
* Apply wording to edges method in all graph classes.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Compatibility updates from testing with numpy/scipy/pytest rc's (#5226)
* Rm deprecated scipy subpkg access.
* Use recwarn fixture in place of deprecated pytest pattern.
* Rm unnecessary try/except from tests.
* Replace internal `close` fn with `math.isclose`. (#5224)
* Replace internal close fn with math.isclose.
* Fix lines in docstring examples.
* Fix Python 3.10 deprecation warning w/ int div. (#5231)
* Touchups and suggestions for subgraph gallery example (#5225)
* Simplify construction of G with edges rm'd
* Rm unused graph attribute.
* Shorten categorization by node type.
* Simplify node coloring.
* Simplify isomorphism check.
* Rm unit test.
* Rm redundant plotting of each subgraph.
* Use new package name (#5234)
* Allowing None edges in weight function of bidirectional Dijkstra (#5232)
* added following feature also to bidirectional dijkstra: The weight function can be used to hide edges by returning None.
* changed syntax for better readability and code duplicate avoidance
Co-authored-by: Hohmann, Nikolas <nikolas.hohmann@tu-darmstadt.de>
* Add an FAQ about assigning issues. (#5182)
* Add FAQ about assigning issues.
* Add note about linking issues from new PRs.
* Update dev deps (#5243)
* Update minor doc issues with tex notation (#5244)
* Add FutureWarnings to fns that return sparse matrices
- biadjacency_matrix.
- bethe_hessian_matrix.
- incidence_matrix.
- laplacian functions.
- modularity_matrix functions.
- adjacency_matrix.
* Add to_scipy_sparse_array and use it everywhere.
Add a new conversion function to preserve array semantics internally
while not altering behavior for users.
Also adds FutureWarning to to_scipy_sparse_matrix.
* Add from_scipy_sparse_array. Supercedes from_scipy_sparse_matrix.
* Handle deprecations in separate PR.
* Fix docstring examples.
Co-authored-by: Mridul Seth <mail@mriduls.com>
Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com>
Co-authored-by: Andrew Knyazev <andrew.knyazev@ucdenver.edu>
Co-authored-by: Dan Schult <dschult@colgate.edu>
Co-authored-by: eskountis <56514439+eskountis@users.noreply.github.com>
Co-authored-by: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com>
Co-authored-by: NikHoh <nikhoh@web.de>
Co-authored-by: Hohmann, Nikolas <nikolas.hohmann@tu-darmstadt.de>
Co-authored-by: Sultan Orazbayev <contact@econpoint.com>
Co-authored-by: Mridul Seth <mail@mriduls.com>
|
| |
|
|
|
|
|
| |
* Rm deprecated scipy subpkg access.
* Use recwarn fixture in place of deprecated pytest pattern.
* Rm unnecessary try/except from tests.
|
| |
|
|
|
|
|
| |
* Use array ops for distance calculation.
Removes for-loops and matmul.
* Refactor spiral layout equidist to use arrays.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add minimal mypy configuration file.
* Add mypy workflow to GH.
* Properly import sentinels from traversal.edgedfs.
* mypy doesn't like variables named \"e\".
* Rm annotations from single function.
* Fix name collisions in test suite.
Make sure all tests have unique names.
* Rm unused random seed in test setup.
* Rm redundant __all__ specification.
* Silence mypy error from sum(). Mypy bug?
* Fix tsp test instantiation nit.
* \"type: ignore\" to suppress conditional fn sigature errors.
* Remaining \"type: ignore\" to appease mypy.
* Configure mypy to ignore inheritance issues.
* Update exclude conf for CI.
- Add yaml
- Reformat regex containing reportviews
* Rm partial annotations from lukes.py.
Fixes mypy errors due to unannotated code.
* Reorg defaultdict to reduce type: ignore cruft.
* Homogenize signatures for fns defined in conditionals.
* err as varname only in exception catching.
* Fix name collision in Bellman-Ford test suite.
|
| |
|
|
| |
In principle, ax.transOffset is not necessary and causes problems
with matplotlib 3.5.0rc1 - see gh-5167.
|
| |
|
|
|
|
|
|
|
| |
* fixed bug in multipartite_layout so subset labels can be non-numeric
* Added non-numeric partition label test to test_multipartite_layout.
* moved multipartite non-numeric partition label test outside of main test class
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
|
| |
The arrowsize param to draw_networkx_edges can now be a list of values, one value
per edge.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Paremtrize edge color default.
* Simplify.
* Add tests for single edge_color.
* Add test of edge_color tuple interpretation.
* Parametrize single-edge_color tests on edgelist.
* Add tests for num ec gt or lt num edges.
* Rm redundant tests.
* Factor out global alpha test.
* Factor out tests for edges w/ single line width.
* Factor out tests of linewidth as a sequence.
* Refactor edge cmap scaling test.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Drop Py37
* XML serialization issue
* Use math.comb
Co-authored-by: Simone Gasperini <simone.gasperini2@studio.unibo.it>
* Run pyupgrade --py38-plus
* Run black
* More documentation
* Deprecate euclidean
Co-authored-by: Simone Gasperini <simone.gasperini2@studio.unibo.it>
|