Learn R Programming

windfarmGA (version 5.0.0)

plot_generation: Plot all layouts of one generation

Description

Occupancy map of one generation, then the distinct layouts as small maps. In an interactive session each page waits for Enter so you can step through every distinct layout (n_show maps per page). Non-interactive calls only draw the first n_show maps.

Usage

plot_generation(
  result,
  area,
  generation = NULL,
  n_show = 6,
  interactive = NULL,
  ask = NULL
)

Value

The list from generation_layouts, invisibly.

Arguments

result

The output of genetic_algorithm

area

Site polygon (sf, SpatialPolygons, or coordinate matrix). Must be projected in metres.

generation

Generation index (1 = first). Default is the last generation.

n_show

Distinct layouts per page (and, if ask is FALSE, how many to draw in total). Default is 6. Set to 0 to skip the maps.

interactive

Use plotly for the occupancy map when available.

ask

If TRUE, wait for Enter and page through all distinct layouts. Default is TRUE in an interactive session.

See Also

Other Plotting Functions: generation_layouts(), plot_cell_heatmap(), plot_cloud(), plot_development(), plot_evolution(), plot_parkfitness(), plot_population(), plot_result(), plot_windfarmGA(), plot_windrose(), population_census(), random_search_single()

Examples

Run this code
# \donttest{
plot_generation(resultrect, sp_polygon, generation = 10)
# }

Run the code above in your browser using DataLab