@@ -42,7 +42,7 @@ Plot a graph visualization with various styling options.
4242- `node_color::Symbol=:purple`: Node color or color gradient
4343- `node_stroke_width::Real=0`: Stroke width for node outlines
4444- `node_stroke_color::Symbol=nothing`: Stroke color for node outlines
45- - `geography::NamedTuple =nothing`: Named tuple with geography data, see also `apply_geography()`
45+ - `geography=nothing`: Dict or NamedTuple with geography data, see also `apply_geography()`
4646- `obstacles::Bool=false`: Show obstacles from geography
4747- `obstacle_color::Symbol=:black`: Color for obstacles
4848- `obstacle_thickness::Symbol=3`: Thickness for obstacles
@@ -89,7 +89,7 @@ function plot_graph(graph, edges = nothing; kwargs...)
8989 # PLOT COLORMAP
9090 if op. map != = nothing || op. geography != = nothing
9191 if op. geography != = nothing
92- vec_map = op. geography. z
92+ vec_map = op. geography[ :z ]
9393 else
9494 vec_map = vec (op. map)
9595 end
@@ -112,8 +112,8 @@ function plot_graph(graph, edges = nothing; kwargs...)
112112 end
113113
114114 # PLOT OBSTACLES
115- if op. obstacles
116- obstacles = op. geography. obstacles
115+ if op. obstacles && length (op . geography[ :obstacles ]) > 0
116+ obstacles = op. geography[ : obstacles]
117117 for i in 1 : size (obstacles, 1 )
118118 x1 = vec_x[obstacles[i, 1 ]]
119119 y1 = vec_y[obstacles[i, 1 ]]
0 commit comments