Skip to contents

Wrapper to create geom_contour of a function

Usage

ggcontour(x, y, f)

Arguments

x, y

Vectors defining the x and y axis

f

The function to plot

Value

A gg object

Examples

x <- y <- seq(-10, 10, 0.1)
f <- function(x, y) { r <- sqrt(x^2+y^2); 10 * sin(r)/r }
ggcontour(x, y, f)
#> Warning: Removed 1 row containing non-finite outside the scale range
#> (`stat_contour_filled()`).