Visualization
Scientific visualization
The framework is integrated with the powerful Makie.jl ecosystem. The recipes documented below assume that a Makie backend is loaded in the same session.
Meshes.viz — Function
viz(object; [options])Visualize Meshes.jl object with various options.
Available options
color- scalar or vector of colors for geometriesalpha- scalar or vector of transparency values in [0, 1]colormap- color scheme (a.k.a. map) from ColorSchemes.jlcolorrange- minimum and maximum color values or symbolshowsegments- visualize segmentssegmentcolor- color of segmentssegmentsize- width of segmentsshowpoints- visualize pointspointmarker- marker of pointspointcolor- color of pointspointsize- size of points
For Mesh subtypes, the length of the vector of colors determines if the colors should be assigned to vertices or to elements.
Values passed to color can be of any type, as long as they can be converted to colors by the colorfy function from the Colorfy.jl package.
Examples
Different coloring methods (vertex vs. element):
# vertex coloring (i.e. linear interpolation)
viz(mesh, color = 1:nvertices(mesh))
# element coloring (i.e. discrete colors)
viz(mesh, color = 1:nelements(mesh))Different strategies to show the boundary of geometries (showsegments vs. boundary):
# visualize boundary with showsegments
viz(polygon, showsegments = true)
# visualize boundary with separate call
viz(polygon)
viz!(boundary(polygon))Notes
This function will only work in the presence of a Makie.jl backend via package extensions in Julia v1.9 or later versions of the language.
No docstring defined.
Plot type
The plot type alias for the viz function is Viz.
Attributes
alpha = 1.0 — No docs available.
color = :slategray3 — No docs available.
colormap = :viridis — No docs available.
colorrange = :extrema — No docs available.
pointcolor = :gray30 — No docs available.
pointmarker = :circle — No docs available.
pointsize = 4 — No docs available.
segmentcolor = :gray30 — No docs available.
segmentsize = 1.5 — No docs available.
showpoints = false — No docs available.
showsegments = false — No docs available.
Meshes.viz! — Function
viz!(object; [options])Visualize Meshes.jl object in an existing scene with options forwarded to viz.
viz! is the mutating variant of plotting function viz. Check the docstring for viz for further information.
Users can also call Makie's plot function in the geometry column as in
Mke.plot(data.geometry)and this is equivalent to calling the viz recipe above. The plot function also works with other objects such as EmpiricalHistogram. That is convenient if you don't remember the name of the recipe.
Additionaly, we provide a basic scientific viewer to visualize all viewable variables in the data:
GeoTables.viewer — Function
viewer(geotable; kwargs...)Basic scientific viewer for geospatial table geotable.
Aesthetic options are forwarded via kwargs to the Meshes.viz recipe.
Notes
This function will only work in the presence of a Makie.jl backend via package extensions in Julia v1.9 or later versions of the language.
GeoTables.cbar — Function
cbar(fig[row, col], values; colormap=:viridis, colorrange=:extrema)Add a colorbar to fig[row, col] for the given values and options for the colorfy function from the Colorfy.jl package.
Notes
This function will only work in the presence of a Makie.jl backend via package extensions in Julia v1.9 or later versions of the language.
Statistical plots
Built-in
A hscatter plot between two variables var1 and var2 (possibly with var2 = var1) is a simple scatter plot in which the dots represent all ordered pairs of values of var1 and var2 at a given lag h.
data = georef((Z=[10sin(i/10) + j for i in 1:100, j in 1:200],))
samp = sample(data, UniformSampling(500))
fig = Mke.Figure(size = (800, 800))
hscatter(fig[1,1], samp, "Z", "Z", lag=0)
hscatter(fig[1,2], samp, "Z", "Z", lag=20)
hscatter(fig[2,1], samp, "Z", "Z", lag=40)
hscatter(fig[2,2], samp, "Z", "Z", lag=60)
fig
Other plots
The plots below can be very useful to explore the distribution of values in a geotable.
PairPlots.jl provides the pairplot function to explore multivariate continuous distributions.
AlgebraOfGraphics.jl is a very flexible alternative that supports grouped and faceted layouts based on categorical variables.
Biplots.jl provides 2D and 3D statistical biplots for identifying main axes of variation.