rcosmo (version 1.1.2)

plot.CMBDataFrame: Plot CMB Data

Description

This function produces a plot from a CMBDataFrame.

Usage

# S3 method for CMBDataFrame
plot(x, intensities = "I", add = FALSE,
  sample.size, type = "p", size = 1, box = FALSE, axes = FALSE,
  aspect = FALSE, col, back.col = "black", labels, hp.boundaries = 0,
  hpb.col = "gray", depth_test = "less", lab_depth_test = "always",
  ...)

Arguments

intensities

The name of a column that specifies CMB intensities. This is only used if col is unspecified.

add

If TRUE then this plot will be added to any existing plot. Note that if back.col (see below) is specified then a new plot window will be opened and add = TRUE will have no effect.

sample.size

Optionally specifies the size of a simple random sample to take before plotting. This can make the plot less computationally intensive.

type

A single character indicating the type of item to plot. Supported types are: 'p' for points, 's' for spheres, 'l' for lines, 'h' for line segments from z = 0, and 'n' for nothing.

size

The size of plotted points.

box

Whether to draw a box.

axes

Whether to draw axes.

aspect

Either a logical indicating whether to adjust the aspect ratio, or a new ratio.

col

Specify the colour(s) of the plotted points.

back.col

Optionally specifies the background colour of the plot. This argument is passed to rgl::bg3d.

labels

Optionally specify a vector of labels to plot, such as words or vertex indices. If this is specified then rgl::text3d is used instead of rgl::plot3d. Then length(labels) must equal nrow(x).

hp.boundaries

Integer. If greater than 0 then HEALPix pixel boundaries at nside = hp.boundaries will be added to the plot.

hpb.col

Colour for the hp.boundaries.

depth_test

The depth test to be applied to the plotted points. This controls how resistant the plotted object is to being obscured. See rgl.material

lab_depth_test

The rgl depth test to be applied to the labels and pixel boundaries if present. See rgl.material

...

Arguments passed to rgl::plot3d.

Value

A plot of the CMB data

Examples

Run this code
# NOT RUN {
## First download the map
# downloadCMBMap(foreground = "smica", nside = 1024)
# sky <- CMBDataFrame("CMB_map_smica1024.fits")
# plot(sky, sample.size = 800000)

# }

Run the code above in your browser using DataLab