plot_voronoi: Plotting pretty Voronoi bin images

View source: R/plot_images.R

plot_voronoiR Documentation

Plotting pretty Voronoi bin images

Description

A function to produce a plot of the Voronoi bins produced by build_datacube() with associated colour bar and labels.

Usage

plot_voronoi(
  voronoi_bins,
  fig = c(0, 1, 0, 1),
  new = F,
  main = "",
  na.color = "white",
  zlim = NA,
  ...
)

Arguments

voronoi_bins

Numeric array containing the metallicity image.

fig

Numeric array of length 4 describing the boundary of the image

new

Boolean. Should the image be added to the existing plot? Default is FALSE.

main

Image title, default "".

na.color

String. Colour given to NA values in the image.

zlim

Numeric array of length 2. Describing the numeric range of colours in the image. Default is NA, in which the range will be described by the minimum and maximum values in the image.

...

Further variables passed to magimage. See magimage for further details.

Value

Returns an image to the plotting window of the input build_datacube image.

Examples

ss_pd_eagle = system.file("extdata", "SimSpin_example_EAGLE.hdf5",
package = "SimSpin")
ss_eagle = make_simspin_file(ss_pd_eagle, write_to_file = FALSE)
cube = build_datacube(simspin_file = ss_eagle,
                      telescope = telescope(type="SAMI"),
                      observing_strategy = observing_strategy(),
                      method = "velocity", voronoi_bin = TRUE)
plot_voronoi(cube$raw_images$voronoi_bins)

kateharborne/SimSpin documentation built on April 28, 2024, 2 p.m.