title: Find the shortest route using osmnx
body: <p>I want to find the shortest path between several points with the help of osmnx. I use the following code. But its output is only one point.
  Does anyone know why?</p>
  <pre><code>import osmnx as ox
  
  place_name = &quot;Hamedan&quot;
  graph = ox.graph_from_place(place_name, network_type='drive')
  #graph_proj = ox.projection.project_graph(graph, to_crs='epsg:32639')
  
  lats = [34.84008, 34.81894, 34.81746, 34.78828, 34.77877, 34.76029, 34.77038, 34.79837, 34.80043, 34.80108]
  lngs = [48.54952, 48.54635, 48.51784, 48.50858, 48.51648, 48.53305, 48.50420, 48.51442, 48.50549, 48.48361]
  point_list = [(lng, lat) for lng, lat in zip(lats, lngs)]
  
  nearest_nodes = [ox.distance.nearest_nodes(graph, geographic_coordinates[0], geographic_coordinates[1],  return_dist=False) for geographic_coordinates in point_list]
  
  routes = [ox.distance.shortest_path(graph,nearest_nodes[i], nearest_nodes[i+1], weight='length', cpus=1) for i in range(len(nearest_nodes)-1)]
  
  fig, ax = ox.plot.plot_graph_routes(graph,routes,
      ax=None,
      figsize=(8, 8),
      bgcolor=&quot;#111111&quot;,
      node_color=&quot;w&quot;,
      node_size=15,
      node_alpha=None,
      node_edgecolor=&quot;none&quot;,
      node_zorder=1,
      edge_color=&quot;#999999&quot;,
      edge_linewidth=1,
      edge_alpha=None,
      show=True,
      close=False,
      save=False,
      filepath=None,
      dpi=300,
      bbox=None)
  </code></pre>