plot.simulation: Visualize an N-body simulation

View source: R/plot.R

plot.simulationR Documentation

Visualize an N-body simulation

Description

Basic routine to visualise the result of an N-body simulation, projected onto a plane.

Usage

## S3 method for class 'simulation'
plot(
  x,
  y,
  units = 1,
  index1 = 1,
  index2 = 2,
  xlim = NULL,
  ylim = NULL,
  center = c(0, 0, 0),
  cex = 0.3,
  pch = 20,
  title = "",
  asp = 1,
  pty = "m",
  col = "black",
  alpha.orbits = 1,
  alpha.snapshots = 1,
  lwd = 1,
  show.orbits = TRUE,
  show.snapshots = TRUE,
  show.ics = TRUE,
  show.fcs = TRUE,
  ...
)

Arguments

x

is a simulation-object as produced by run.simulation

y

deprecated argument included for consistency with generic plot function

units

length unit in SI units

index1

index of the dimension plotted on the x-axis

index2

index of the dimension plotted on the y-axis

xlim

2-vector specifying the plotting range along the x-axis

ylim

2-vector specifying the plotting range along the y-axis

center

3-vector specifying the plotting center in the specified units

cex

point size

pch

point type

title

title of plot

asp

aspect ratio of x and y axes

pty

character specifying the type of plot region to be used; "s" generates a square plotting region and "m" generates the maximal plotting region.

col

either (1) a single color, (2) a n-element vector of colors for each particle or (3) a function(n,...) producing n colors, e.g. 'rainbow'

alpha.orbits

opacity (0...1) of orbital lines.

alpha.snapshots

opacity (0...1) of snapshot points.

lwd

line width of orbital lines.

show.orbits

logical flag. If TRUE (default), the orbits are shown as straight lines between snapshots.

show.snapshots

logical flag. If TRUE (default), points are shown for each snapshot.

show.ics

logical flag. If TRUE (default), the initial positions are highlighted.

show.fcs

logical flag. If TRUE (default), the final positions are highlighted.

...

additional parameters for plot

Value

None

Author(s)

Danail Obreschkow


nbody documentation built on Sept. 11, 2024, 7:47 p.m.