rd_2_plots_continuous {barsurf}R Documentation

Plots of Functions of Two Continuous Variables

Description

Plots (in 2D and 3D) of functions (represented by matrices) of two continuous variables.

Usage

plot2d.contour (x, y, z, zb,
    contours=TRUE, heat.map=TRUE,
    main, xlab="x", ylab="y",
    colv.1, colv.2, contrast=0,
    pty="s", ...)

plot3d.surface (x, y, z,
    main, xlab="x", ylab="y",
    colv.1, colv.2, contrast=0,
    zlim, ...)

#deprecated, do not use
plot3d.surf (...)

Arguments

x

An optional sorted vector of x values.

y

An optional sorted vector of y values.

z

A matrix of point values.

zb

A vector of contour values.

contours

If true (the default), plot contour lines.

heat.map

If true (the default), plot a heat map.

main

.

xlab

.

ylab

.

colv.1

An HCL color vector.

colv.2

An HCL color vector.

contrast

A numeric scalar, giving the relative contrast, currently in the interval [-1, 0].

pty

.

zlim

The z axis limits.

...

Other arguments for par().

Details

If x and y values are supplied then their lengths should be equal to the dimensions of z.

For plot2d.contour, colors are interpolated between colv.1 and colv.2 based on the values of z. For plot3d.surface, colors are interpolated based on the slopes of z.

By default, colors are determined by global options.

Examples

x = y = 1:30
f = function (x, y) x ^ 2 + y ^ 2
z = outer (x, y, f)
plot3d.surface (,,z)

[Package barsurf version 0.3.1 Index]