plot_hespdiv: Plot hespdiv results

View source: R/plot_hespdiv.R

plot_hespdivR Documentation

Plot hespdiv results

Description

This function is used to plot the results obtained with the hespidv function. The plot showcases subdivisions of the study area by split-lines, visualizing their performances or rank with colors or line widths. Additionally, it can display the spatial distribution of observations and number of observations in each location.

Usage

plot_hespdiv(
  obj,
  type = "color",
  n.loc = FALSE,
  performance = TRUE,
  legend_title = NULL,
  title = NULL,
  subtitle = NULL,
  pnts.col = NULL,
  seed = 10
)

Arguments

obj

A hespdiv object.

type

A character. Either "width" or "color" (default "color"). Determines whether quality of split-lines is expressed by line width or color.

n.loc

A Boolean value. Would you like to visualize the number of observations at each location? Only possible, when there are localities with more than one observation. If the type is 'color,' the number of observations is expressed through point sizes. Otherwise, they are expressed using color in a logarithmic scale.

performance

logical. TRUE - display split-line performance, FALSE - rank. Displaying rank makes the spatial dendrogram clearer.

legend_title

A character value that indicates the title of the legend for the split-lines. The default is built according to the method information available in "obj$call.info".

title

A character that indicates the title of the plot.

subtitle

A character that indicates the subtitle of the plot.

pnts.col

A character or numeric vector providing color codes for data points.

seed

An integer value that indicates seed used to randomize the colors of the split-lines. Only meaningful, when argument type = "width". Try setting a different value, if colors of parallel split-lines or nearby labels look too similar or to increase the general appeal of the graph.

Details

The return ggplot object can be edited as any other ggplot objects by removing undesired elements, changing theme or overlying the plot with additional elements.

Value

A ggplot object.

Author(s)

Liudas Daumantas

See Also

Other HespDiv visualization options: blok3d(), create_gif(), dendro(), plot.nullhespdiv(), plot_cs_hsa(), plot_hsa(), plot_hsa_q(), poly_scheme(), polypop()

Examples

plot_hespdiv(example_hespdiv)
plot_hespdiv(example_hespdiv, type = "width")
plot_hespdiv(example_hespdiv, n.loc = TRUE)

hespdiv documentation built on May 21, 2026, 5:09 p.m.