gcf_func {ContourFunctions}R Documentation

Makes filled contour plot from function

Description

A contour plot of the given function without sidebar by default. It calls the function 'cf_grid' to make the actual plot.

Usage

gcf_func(fn0, n = 100, xlim = c(0, 1), ylim = c(0, 1),
  xylim = NULL, batchmax = 1, out.col.name = NULL, out.name = NULL,
  pts = NULL, ...)

Arguments

fn0

function to plot, first argument must be two-dimensional

n

number of points in each dimension

xlim

x limits for the contour plot

ylim

y limits for the contour plot

xylim

x and y limits for the contour plot, use when both are same #@param mainminmax whether the min and max values should be shown in the title of plot

batchmax

number of datapoints that can be computed at a time

out.col.name

if a column needs to be selected from the function, specify it

out.name

Selects with a $ the name from output to be used, for lists and data frames #@param pretitle Text to be preappended to end of plot title #@param posttitle Text to be appended to end of plot title #@param title Title for the plot #@param mainminmax_minmax Whether [min,max]= should be shown in title or just the numbers

pts

Points to plot on top of contour

...

Passed to cf_grid

Examples

gcf_func(function(x){x[1]*x[2]})
gcf_func(function(x)(exp(-(x[1]-.5)^2-5*(x[2]-.5)^2)))
gcf_func(function(xx){exp(-sum((xx-.5)^2/.1))}, bar=TRUE, color.palette=terrain.colors)
gcf_func(function(xx){exp(-sum((xx-.5)^2/.1))}, bar=TRUE, mainminmax=TRUE)
gcf_func(function(x)(exp(-(x[1]-.5)^2-5*(x[2]-.5)^2)))

[Package ContourFunctions version 0.1.1 Index]