Skip to content

Commit

Permalink
Merge pull request #17 from gabrieletijunaityte/master
Browse files Browse the repository at this point in the history
Fix ox plot not opening up
  • Loading branch information
Timmarh authored Oct 1, 2024
2 parents 3ae1e8d + b13319e commit 79e26f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion index.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -589,10 +589,12 @@ shortestroute = ox.routing.shortest_path(G=wageningenRoadsGraph, orig=source,
dest=target, weight='length')
# Plot
ox.plot.plot_graph_route(wageningenRoadsGraph, shortestroute, figsize=(20, 20),
fig, ax = ox.plot.plot_graph_route(wageningenRoadsGraph, shortestroute, figsize=(20, 20),
route_alpha=0.6, route_color='darkred', bgcolor='white',
node_color='darkgrey', edge_color='darkgrey',
route_linewidth=10, orig_dest_size=100)
fig.show()
```

<img src="./images/shortestPathGraph.png" alt="Shortest path from Wageningen University Campus to Wageningen City Center" width = "100%">
Expand Down
6 changes: 4 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1786,10 +1786,12 @@ <h1 id="network-analysis">Network analysis</h1>
dest=target, weight='length')

# Plot
ox.plot.plot_graph_route(wageningenRoadsGraph, shortestroute, figsize=(20, 20),
fig, ax = ox.plot.plot_graph_route(wageningenRoadsGraph, shortestroute, figsize=(20, 20),
route_alpha=0.6, route_color='darkred', bgcolor='white',
node_color='darkgrey', edge_color='darkgrey',
route_linewidth=10, orig_dest_size=100)</code></pre>
route_linewidth=10, orig_dest_size=100)

fig.show()</code></pre>
</div>
<p><img src="./images/shortestPathGraph.png" alt="Shortest path from Wageningen University Campus to Wageningen City Center" width = "100%"></p>
<h1 id="interactive-visualization">Interactive visualization</h1>
Expand Down

0 comments on commit 79e26f9

Please sign in to comment.