({{, (RefLink[JuliaSetPlot, paclet:ref/JuliaSetPlot])[f,z] 
plots the Julia set of the rational function f of the variable z.}, {, (RefLink[JuliaSetPlot, paclet:ref/JuliaSetPlot])[c]
plots the Julia set of the function f(z)==(z^2)+c. }})

OpenersNotesSection(Spacer1)Details and Options

The Julia set of a function f is the closure of the set of all repelling fixed points of f.

(RefLink[JuliaSetPlot, paclet:ref/JuliaSetPlot]) has the same options as (RefLink[Graphics, paclet:ref/Graphics]), with the following additions and changes:

The possible methods are "InverseIteration", "EscapeTime", and "OrbitDetection".

With (RefLink[Method, paclet:ref/Method])->"InverseIteration", (RefLink[JuliaSetPlot, paclet:ref/JuliaSetPlot]) produces a (RefLink[ListPlot, paclet:ref/ListPlot]) showing individual points of the Julia set.

With (RefLink[Method, paclet:ref/Method])->"EscapeTime" or with (RefLink[Method, paclet:ref/Method])->"OrbitDetection", (RefLink[JuliaSetPlot, paclet:ref/JuliaSetPlot]) produces a (RefLink[Graphics, paclet:ref/Graphics]) object containing a (RefLink[Raster, paclet:ref/Raster]) primitive.

With (RefLink[ColorFunction, paclet:ref/ColorFunction])->f, where f is a function, the argument of f is a real number in [0,1] proportional to the number of iterates, and f must return color directives, such as (RefLink[RGBColor, paclet:ref/RGBColor]) and (RefLink[Hue, paclet:ref/Hue]), or named colors, such as (RefLink[Red, paclet:ref/Red]) and (RefLink[Blue, paclet:ref/Blue]).

(RefLink[ColorFunction, paclet:ref/ColorFunction])->"name" is equivalent to (RefLink[ColorFunction, paclet:ref/ColorFunction])->((RefLink[If, paclet:ref/If])[#==1,(RefLink[Black, paclet:ref/Black]),(RefLink[ColorData, paclet:ref/ColorData])["name"][#]]&).

The list of possible color function names is given by (RefLink[ColorData, paclet:ref/ColorData])["Gradients"].

OpenersPrimaryExamplesSection(Spacer1)Examples  (35)

OpenersExampleSection0(Spacer1)Basic Examples  (4)

Generate the filled Julia set of (z^2)-1:

JuliaSetPlot[-1]

Generate the Julia set:

JuliaSetPlot[-1,ColorFunction->None]

Show the filled Julia set with the points in the Julia set:

JuliaSetPlot[-1,PlotStyle->White]

Show a legend of the number of iterations:

JuliaSetPlot[0.365-0.37I,PlotLegends->Automatic]

OpenersExampleSection1(Spacer1)Scope  (7)

(RefLink[JuliaSetPlot, paclet:ref/JuliaSetPlot])[c] generates the Julia set of a function of the form (z^2)+c:

JuliaSetPlot[-0.77+0.22I]

JuliaSetPlot[(z^2)-0.77+0.22I,z]

Generate the Julia set of a polynomial:

JuliaSetPlot[(z^2)-z-0.125,z]

Generate the filled Julia set of a rational function:

JuliaSetPlot[z^2/(z^2-1),z]

Change the color function:

JuliaSetPlot[(z^2)-0.77+0.22I,z,ColorFunction->Hue]

Show the points in the Julia set:

JuliaSetPlot[(z^2)-0.77+0.22I,z,ColorFunction->Hue,PlotStyle->Opacity[0.2,Black]]

Show just the points:

JuliaSetPlot[(z^2)-0.77+0.22I,z,ColorFunction->None,PlotStyle->Opacity[0.2,Black]]

Use a theme with simple ticks in a high-contrast color scheme:

JuliaSetPlot[-0.77+0.22I,PlotTheme->"Web"]

OpenersExampleSection2(Spacer1)Options  (19)

OpenersExampleSubsection0(Spacer1)AspectRatio  (2)

The default aspect ratio uses equal scales for x and y:

JuliaSetPlot[(z^2)-z-1,z]

Specify a different ratio:

JuliaSetPlot[(z^2)-z-1,z,AspectRatio->1]

OpenersExampleSubsection1(Spacer1)Background  (1)

Use a black background as contrast with the points in the Julia set:

JuliaSetPlot[-1,PlotStyle->Red,Background->Black,ColorFunction->None]

OpenersExampleSubsection2(Spacer1)ColorFunction  (3)

Use a built-in color function to color by a scaled number of iterations:

JuliaSetPlot[-1,ColorFunction->Hue]

Zoom in to a region to see more details:

JuliaSetPlot[-1,ColorFunction->Hue,PlotRange->{{0.3,0.45},{0.35,0.5}}]

Use a named color gradient:

JuliaSetPlot[-1,Method->"EscapeTime",ColorFunction->"GreenPinkTones"]

Write a custom color function:

JuliaSetPlot[-1,ColorFunction -> (If[#3==1,Purple,RGBColor[(((1-#3))^2),(((1-#3))^3),1-#3]]&)]

OpenersExampleSubsection3(Spacer1)Frame  (1)

Turn (RefLink[Frame, paclet:ref/Frame]) off:

JuliaSetPlot[-1,Frame->False]

OpenersExampleSubsection4(Spacer1)FrameLabel  (1)

Use (RefLink[FrameLabel, paclet:ref/FrameLabel]) to label the complex plane:

JuliaSetPlot[-1,FrameLabel->{"Real","Imaginary"}]

OpenersExampleSubsection5(Spacer1)FrameStyle  (1)

Use (RefLink[FrameStyle, paclet:ref/FrameStyle]) to change color:

JuliaSetPlot[-1,FrameStyle->Blue]

OpenersExampleSubsection6(Spacer1)FrameTicks  (1)

Turn frame ticks off:

JuliaSetPlot[-1,FrameTicks->None]

OpenersExampleSubsection7(Spacer1)ImageResolution  (1)

Increase (RefLink[ImageResolution, paclet:ref/ImageResolution]) for finer plots:

Table[JuliaSetPlot[-1,ImageResolution->ir],{ir,50,300,50}]

OpenersExampleSubsection8(Spacer1)PerformanceGoal  (2)

Generate a higher-quality plot:

AbsoluteTiming[JuliaSetPlot[-0.125+0.75I,PerformanceGoal->"Quality"]]

Emphasize performance, possibly at the cost of quality:

AbsoluteTiming[JuliaSetPlot[-0.125+0.75I,PerformanceGoal->"Speed"]]

OpenersExampleSubsection9(Spacer1)PlotLegends  (1)

Legends show the number of iterations:

JuliaSetPlot[-0.77+0.22I,PlotRange->{{-0.2,0.8},{-0.8,0.2}},PlotLegends->Automatic]

OpenersExampleSubsection10(Spacer1)PlotRange  (2)

The plot range is chosen automatically, based on the Julia set:

JuliaSetPlot[-1]

JuliaSetPlot[-2/3]

Zoom in to a region to see more details:

JuliaSetPlot[-1,PlotRange->{{0.3,0.45},{0.35,0.5}}]

JuliaSetPlot[-1,PlotRange->{{0.33,0.35},{0.44,0.46}}]

OpenersExampleSubsection11(Spacer1)PlotStyle  (2)

By default, the points are not shown unless (RefLink[ColorFunction, paclet:ref/ColorFunction])->(RefLink[None, paclet:ref/None]):

{JuliaSetPlot[-1],JuliaSetPlot[-1,ColorFunction->None]}

Specify the plot style:

{JuliaSetPlot[-1,PlotStyle->Orange],JuliaSetPlot[-1,PlotStyle->Orange,ColorFunction->None]}

OpenersExampleSubsection12(Spacer1)PlotTheme  (1)

Use a theme with increased contrast and axes:

JuliaSetPlot[-0.125+0.75I,PlotTheme->"Scientific"]

JuliaSetPlot[-0.125+0.75I,PlotTheme->"Scientific",ColorFunction->None]

OpenersExampleSection3(Spacer1)Possible Issues  (4)

(RefLink[JuliaSetPlot, paclet:ref/JuliaSetPlot]) only works with rational functions:

JuliaSetPlot[Sin[z],z]

When using orbit detection, sometimes no attractive orbits are detected:

JuliaSetPlot[z/(z^2-1),z, Method -> "OrbitDetection"]

If the value of the "Bound" option is too low for a rational function, no points may be returned:

JuliaSetPlot[(500/z^2 -1),z]

JuliaSetPlot[(500/z^2 -1),z,"Bound"->9,Axes->True,PlotStyle->Automatic,ColorFunction->None]

Some very large Julia sets can take a long time to compute:

AbsoluteTiming[JuliaSetPlot[((z^2-5/19)/(z^2+5/19)),z,PlotStyle->Automatic,ColorFunction->None]]

OpenersExampleSection4(Spacer1)Neat Examples  (1)

Colorize the components of a Julia set:

Colorize[MorphologicalComponents[JuliaSetPlot[z^2+(-0.123+0.745I),z,PlotStyle->Automatic, ColorFunction->None,Frame->False,"ClosenessTolerance"->0.001],.5]]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[MandelbrotSetPlot, paclet:ref/MandelbrotSetPlot])  ▪  (RefLink[JuliaSetIterationCount, paclet:ref/JuliaSetIterationCount])  ▪  (RefLink[ListPlot, paclet:ref/ListPlot])  ▪  (RefLink[ArrayPlot, paclet:ref/ArrayPlot])  ▪  (RefLink[DensityPlot, paclet:ref/DensityPlot])  ▪  (RefLink[ContourPlot, paclet:ref/ContourPlot])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Iterated Maps & Fractals, paclet:guide/IteratedMapsAndFractals])}})}})