Converts objects produced by mandelbrot to tidy data.frames for use with ggplot and other tidyverse packages.

# S3 method for mandelbrot
as.data.frame(x, ...)

Arguments

x

a Mandelbrot set object produced by mandelbrot

...

ignored

Value

a 3-column data.frame

Examples

mb <- mandelbrot() df <- as.data.frame(mb) head(df)
#> x y value #> 1 -2.000000 -2 1 #> 2 -1.993322 -2 1 #> 3 -1.986644 -2 1 #> 4 -1.979967 -2 1 #> 5 -1.973289 -2 1 #> 6 -1.966611 -2 1