Learn R Programming

sdetorus (version 0.1.10)

torusAxis: Draws pretty axis labels for circular variables

Description

Wrapper for drawing pretty axis labels for circular variables. To be invoked after plot with axes = FALSE has been called.

Usage

torusAxis(sides = 1:2, twoPi = FALSE, ...)

Value

This function is usually invoked for its side effect, which is to add axes to an already existing plot.

Arguments

sides

an integer vector specifying which side of the plot the axes are to be drawn on. The axes are placed as follows: 1 = below, 2 = left, 3 = above, and 4 = right.

twoPi

flag indicating that \([0,2\pi)\) is the support, instead of \([-\pi,\pi)\).

...

further parameters passed to axis.

Details

The function calls box.

Examples

Run this code
grid <- seq(-pi, pi, l = 100)
plotSurface2D(grid, grid, f = function(x) sin(x[1]) * cos(x[2]),
              nLev = 20, axes = FALSE)
torusAxis()

Run the code above in your browser using DataLab