summaryrefslogtreecommitdiff
path: root/examples/subclass
Commit message (Collapse)AuthorAgeFilesLines
* Change exception varname e to err (#5130)Dan Schult2021-10-151-2/+2
| | | | A more descriptive variable name for exceptions. This reduces local var naming conflicts when \`e\` is used e.g. to represent edges as a loop variable.
* Changes to rst files to make doctests pass (#4947)Dan Schult2021-07-071-2/+2
| | | | | | | | | | | | | | | | | | | * rst double colons for example code * add nx. prefix to doctest function calls * Remove one line from 1->2 migration rst file the line shows code that works for 1.x *and* 2.x. But it no longer works for all v2.x code. Readers should just use the next line of code, so no reason to keep this in the file. * capture output from subplot and rename DiGraph as DG in introduction.rst * skip running the entire test suite as an example in old_release_log.rst * doctest of examples * remove changes to nexp files
* Refactor gallery (#4422)Jarrod Millman2020-12-062-10/+10
| | | | | | | | | | | | | | | * Add external directory * Move Javascript and JIT * Remove application section * Consolidate and move pygraphviz examples * Clean up imports * Reorder * Fix subclass examples
* Update adjacency_iter to adjacency (#4339)Jon Crall2020-11-121-4/+4
| | | | | | | | | | | | | * Update adjacency_iter to adjacency * Use faster adj * wip * Update plot_antigraph.py Remove benchmark * wip
* Add seeds to gallery examples for reproducibility (#4276)Ross Barnowski2020-10-242-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Seed layout basic/plot_properties. * Seed simple path example * Switch node cmap example to deterministic layout * Seed layout in edge_colormap example * Seed graph gen and layout in ego_graph example * Seed random_geometric_graph example. * Seed layout and pad axes w/ tight_layout. * Seed and modify colors for directed example. * Seeded graph gen and layout * Switch to plasma colormap for better contrast on light bgnd * Seed layout and tight_layout sampson example * Seed and pad axes for unix email example * Seed graph gen and layout for erdos_renyi example * Seed graph gen and layout of degree_seq example * Seed layout of football example * Seed layout for krackhardt centrality example * Seed davis club example * Seed and use np alias in blockmodel example * Seed beam search example. * Seed random graph in eigenval example * Seed heavy metal layout and pad axes * Use deterministic layout for rgraph example * Seed layout for printgraph example. * Add seed to antigraph example. * Use single rng seed value. For examples with multiple uses of rng's (e.g. one for generating a random graph, and another for layout) use a single integer value as the seed for both. * Remove unnecessary submodule paths from examples.
* Format w/ black==20.8b1Jarrod Millman2020-10-061-1/+1
|
* Fix exception causes and messages in 12 modules (#4012)Ram Rachum2020-06-221-2/+2
| | | | | | | * Fix exception causes and messages in 12 modules * Remove deprecated matplotlib.use(warn=False) that was default anyway. Co-authored-by: Dan Schult <dschult@colgate.edu>
* Upgrade to Py36 syntaxJarrod Millman2020-01-011-8/+7
| | | | $ find examples -name \*.py -exec pyupgrade --py36-plus {} \;
* Add links to data filesJarrod Millman2019-11-161-1/+0
|
* Update examplesJarrod Millman2019-11-112-92/+91
|
* PEP8 fixes to testsJarrod Millman2019-10-181-0/+1
|
* Update copyrightJarrod Millman2019-03-302-2/+2
|
* Update copyrightJarrod Millman2018-01-202-2/+2
|
* Fix typo in documentation (#2677)Charles Tapley Hoyt2017-09-211-1/+1
|
* Update printgraph example for v2.0 (#2637)Dan Schult2017-08-261-46/+7
| | | | | | * update printgraph example for v2.0 * Clean up demo code for printgraph
* Fix randomly occurring errorJarrod Millman2017-08-141-4/+4
| | | | Set seed.
* Refactor examples (#2527)Jarrod Millman2017-07-212-12/+19
| | | | | | | | | | | | * Fix unix_email and plot more examples * Fix doctest * Fix more examples * Fix AntiGraph.degree generator error in examples * Style/consistency changes and plot more examples
* Fix sphinx (#2517)Jarrod Millman2017-07-173-55/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Ensure valid rst file * Edit text * Update README and package docstring * Add myself as a contributor * Update gitwash * Fix warnings/errors except citations/footnotes * Remove old note about 3.0 incompatibility * Remove stale ref to gh-pages * Create top-level tools directory (standard practice) * Use sphinx-gallery extension for examples * Sphinx-gallery generates images for `plot_` examples * Comply with pep8 * Don't save figures
* Move data structure to private names and replace with readonly structures ↵Dan Schult2017-06-261-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#2475) * Dont assume iterators for nodes/edges/degrees (prep for views) * Add graph view classes for nodes/edges/degree * Add right set operations (not present in python3.3 KeysView * Add nodes before adding edges so python36 tests work By only adding edges, the nodes were added in order (0,1,3,2) and with the ordered nature of python3.6 dicts the tests failed. Could also fix by using nodelist on each call to to_convert_... * weighted graph convert tests testing empty graphs The edge iterator was exhausted for source before being used for dest * allow DegreeView to include case of nbunch * Make node/edge/degree properties of Graph * View contains fix and Viewers can return self. More tests * Add more tests including one for #2347 * Add nbunch tests and pep8 * Rename to EdgeView and EdgeDataView * docs tweaks and pep8 * fix up nodeDataView contains. Add and clean up tests. * Change the graph attributes to read-only properties * Reframe views code and extend _node to all networkx (still need examples) * Clean up and pep8 for view changes * ername AtlasViews, simplify code and add docstrings * Make G[u] return a view, and catch some doc bugs * Update views to use _node,_adj. Add len to EdgeDataView * minor adjustments to example subclass/printgraph
* Change all X.add_path yp nx.add_path(X,Dan Schult2016-02-022-5/+4
|
* Adjusts imports in drawing with graphviz for v2.0Dan Schult2016-01-112-21/+19
| | | | | Also adjusts examples and docs Cherry-pick from #1930
* Update copyrightsMridul Seth2016-01-011-1/+1
|
* Update examples for iterator edges and nodes methodsDan Schult2015-10-042-8/+8
| | | | | This will help with readthedocs make_gallery #1667 These are solely due to the switch to our 2.0 API
* minor changes related to _iter removalDan Schult2015-08-071-1/+1
| | | | | | Mostly doc string tweaks for graph classes, tutorial. Fixes of blockmodel and antigraph examples api_changes and release_2.0 updates.
* Update examples directoryMridul Seth2015-07-011-36/+3
|
* Improve AntiGraph.Jordi Torrents2015-06-031-7/+7
| | | | Avoid unnecessary method calls.
* Add AntiGraph as a subclass example.Jordi Torrents2015-06-031-0/+207
|
* Fix copyrightsJGab2015-04-211-1/+1
|
* Update for Python3. Refs #384aric2010-08-071-14/+14
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401854
* License change to BSD.aric2009-08-261-2/+2
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401429
* Subclass example. Addresses #256aric2009-08-111-0/+135
--HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401367