@@ -122,15 +122,15 @@ viz(img.geometry, color = img.B, alpha = rand(length(img.B)))
122122
123123Other aesthetic options are available in the official documentation.
124124
125- As another example, consider the visualization of data over a ` GeometrySet ` :
125+ As another example, consider the visualization of data over a set of geometries :
126126
127127``` {julia}
128- gset = GeometrySet( [
128+ geoms = [
129129 Triangle((12, 12), (15, 15), (12, 15)),
130130 Quadrangle((5, 12), (10, 15), (10, 18), (5, 15))
131- ])
131+ ]
132132
133- gis = georef((A=[0.1, 0.2], B=[0.3, 0.4]), gset )
133+ gis = georef((A=[0.1, 0.2], B=[0.3, 0.4]), geoms )
134134
135135viz(gis.geometry, color = gis.A)
136136```
206206
207207:::
208208
209+ ### Reference systems
210+
209211The ` viz ` and ` viz! ` functions are aware of coordinate reference systems, which is a quite
210212unique feature of the framework, explored in the chapter [ Map projections] ( 06-projections.qmd ) .
211213
@@ -219,6 +221,35 @@ world = GeoIO.load("data/countries.geojson")
219221viz(world.geometry, color = 1:nrow(world))
220222```
221223
224+ ### Axis customization
225+
226+ To customize the figure and axis, please refer to Makie.jl documentation. The following
227+ example illustrates the construction of a figure with two subfigures side by side. Each
228+ subfigure has an axis with title and axis labels:
229+
230+ ``` {julia}
231+ fig = Mke.Figure()
232+ ax1 = Mke.Axis(fig[1, 1], title = "Image", xlabel = "Easting", ylabel = "Northing")
233+ ax2 = Mke.Axis(fig[1, 2], title = "Shapes", xlabel = "Easting", ylabel = "Northing")
234+ fig
235+ ```
236+
237+ We can use ` viz! ` to add geospatial data to the existing axes:
238+
239+ ``` {julia}
240+ viz!(ax1, img.geometry, color = img.A)
241+ viz!(ax2, gis.geometry, color = gis.B)
242+ fig
243+ ```
244+
245+ Or use ` viz ` to create a new axis in a new subfigure:
246+
247+ ``` {julia}
248+ viz(fig[2, 1], world.geometry, color = 1:nrow(world))
249+ viz(fig[2, 2], world.geometry, color = area.(world.geometry))
250+ fig
251+ ```
252+
222253## viewer
223254
224255As geospatial data scientists we are often interested in quick inspection
0 commit comments