Learn R Programming

Rgnuplot (version 1.0.3)

Gpmandel: Recursive implementation of the Mandelbrot set function

Description

Gpmandel returns the values calculated from a recursive implementation of the Mandelbrot set function

Usage

Gpmandel(x,y,z,n,maxiterations)

Arguments

x
x-coordinate
y
y-coordinate
z
z-coordinate
n
iteration number
maxiterations
maximum number of iterations

Value

See Also

Gpinit

Examples

Run this code
#Initialize the gnuplot handle
h1<-Gpinit()
#set gnuplot's additional search directories, to the extdata directory from Rgnuplot (default)
Gpsetloadpath(h1)
#change gnuplot's working directory to be the same as R's working directory (default)
Gpsetwd(h1)
## Not run: 
# #create the fractal data from R calling a C function, with more points and more iterations
# mandelxy2<-function(x,y) Gpmandel(x,y,c(0,0),0,1000)
# GpR2splot(mandelxy2,'mandel4.dat',c(-1.5,0.5),c(-1,1),c(500,500),c(300,300),TRUE)
# Gpcmd(h1,'reset
# splot "mandel4.dat" w  pm3d notitle')
# #pause R and gnuplot
# Gppause()## End(Not run)
#close gnuplot handles
h1<-Gpclose(h1)

Run the code above in your browser using DataLab