import networkx as nx
import osmnx as ox
import matplotlib.pyplot as plt
import matplotlib
bounds = [114.05, 22.55, 114.07, 22.57]
north, south, east, west = bounds[3], bounds[1], bounds[2], bounds[0]
G = ox.graph_from_bbox(north, south, east, west, network_type='drive')
ox.plot_graph(G)
ImportError: matplotlib must be installed as an optional dependency for visualization
I have matplotlib but I can't cite it.How to solve this problem.
Complete minimal reproducible example
import networkx as nx
import osmnx as ox
import matplotlib.pyplot as plt
import matplotlib
bounds = [114.05, 22.55, 114.07, 22.57]
north, south, east, west = bounds[3], bounds[1], bounds[2], bounds[0]
G = ox.graph_from_bbox(north, south, east, west, network_type='drive')
ox.plot_graph(G)
Contributing guidelines
Documentation
Existing issues
What operating system and Python version are you using?
Windows 11 /Python 3.9.11
What OSMnx version are you using?
1.9.1
Environment packages and versions
How did you install OSMnx?
Pip
Problem description
import networkx as nx import osmnx as ox import matplotlib.pyplot as plt import matplotlib bounds = [114.05, 22.55, 114.07, 22.57] north, south, east, west = bounds[3], bounds[1], bounds[2], bounds[0] G = ox.graph_from_bbox(north, south, east, west, network_type='drive') ox.plot_graph(G) ImportError: matplotlib must be installed as an optional dependency for visualization I have matplotlib but I can't cite it.How to solve this problem.
Complete minimal reproducible example