Skip to content

Commit

Permalink
Merge pull request #18 from nschloe/networkx-optional
Browse files Browse the repository at this point in the history
Networkx optional
  • Loading branch information
nschloe committed Dec 14, 2021
2 parents 8002aa5 + bf2d9c5 commit b0a5bee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
11 changes: 8 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[metadata]
name = matplotx
version = 0.2.5
version = 0.2.6
author = Nico Schlömer
author_email = nico.schloemer@gmail.com
description = Extensions for Matplotlib
description = Useful styles and extensions for Matplotlib
url = https://github.com/nschloe/matplotx
project_urls =
Code=https://github.com/nschloe/matplotx
Expand Down Expand Up @@ -33,9 +33,14 @@ package_dir =
packages = find:
install_requires =
matplotlib
networkx
numpy >= 1.20.0
python_requires = >=3.7

[options.packages.find]
where=src

[options.extras_require]
all =
networkx
contour =
networkx
3 changes: 2 additions & 1 deletion src/matplotx/_contour.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import matplotlib.colors
import matplotlib.pyplot as plt
import networkx
import numpy as np
from matplotlib.collections import LineCollection
from numpy.typing import ArrayLike
Expand Down Expand Up @@ -130,6 +129,8 @@ def _get_xy_paths(
min_jump: float | None = None,
max_jump: float | None = None,
) -> list[np.ndarray]:
import networkx

# horizontal and vertical edges
# horiz.shape = (nx - 1, ny)
# verti.shape = (nx, ny - 1)
Expand Down

0 comments on commit b0a5bee

Please sign in to comment.