Giter Site home page Giter Site logo

chakravala / fatou.jl Goto Github PK

View Code? Open in Web Editor NEW
110.0 8.0 15.0 5.08 MB

Fatou sets in Julia (Fractals, Newton basins, Mandelbrot)

Home Page: https://crucialflow.com/Fatou.jl

License: MIT License

Julia 100.00%
newton-fractals mandelbrot fractal-images fractals julia-sets complex-numbers recursion chaos nonlinear numerical-analysis

fatou.jl's Introduction

Fatou.jl

Build Status Build status Coverage Status codecov.io

Julia package for Fatou sets. Install using Pkg.add("Fatou") in Julia. See Explore Fatou sets & Fractals in Wiki for detailed examples. This package provides: fatou, juliafill, mandelbrot, newton, basin, plot, and orbit; along with various internal functionality using Reduce and Julia expressions to help compute Fatou.FilledSet efficiently. Full documentation is included. The fatou function can be applied to a Fatou.Define object to produce a Fatou.FilledSet, which can then be passed as an argument to plot functions of Makie, PyPlot, ImageInTerminal. Creation of Fatou.Define objects is done via passing a parse-able function expression string (in variables z, c) and optional keyword arguments to juliafill, mandelbrot, and newton.

Background

This package enables users of Julia lang to easily generate, explore, and share fractals of Julia, Mandelbrot, and Newton type. The name Fatou comes from the mathematician after whom the Fatou sets are named. Note that the Julia language is not named after the mathematician Julia after whom the Julia sets are named. This is a mere coincidence.

Definition (Julia set): For any holomorphic function on a complex plane, the boundary of the set of points whose result diverges when the function is iteratively evaluated at each point.

Definition (Fatou set): The Julia set’s complement is the set of fixed limit points from holomorphic recursion.

Definition (Mandelbrot set): The set of points on a complex parameter space for which the holomorphic recursion does not go to infinity from a common starting point z0.

Definition (Newton fractal): The Julia/Fatou set obtained from the recursion of the Newton method z↦z−m⋅f(z)/f′(z) applied to a holomorphic function.

The package has essentially two different plotting modes controlled by the iter boolean keyword, which toggles whether to color the image by iteration count or whether to use a default (or custom) limit-value coloring function.

The number of Julia threads available is detected at the startup and is reported it back. When a specified Fatou set is computed, multi-threading is used to compute the pixels. Since each pixel is independent of any other pixel, it doesn’t matter in what order or on how many threads it is computed, the more you use the faster it is. The environment variable JULIA_NUM_THREADS can be used to enable the multi-threading for more than 1 thread.

Please share with us your favorite fractals as Fatou code snippets!

Examples

Fatou.Define provides the following optional keyword arguments:

Q::Expr 	= :(abs2(z)),           # escape criterion, (z, c) -> Q
C::Expr 	= :((angle(z)/(2π))*n^p)# coloring, (z, n=iter., p=exp.) -> C= π/2, # Array{Float64,1}      # Bounds, [x(a),x(b),y(a),y(b)]
n::Integer  = 176,                  # vertical grid points
N::Integer  = 35,                   # max. iterations
ϵ::Number   = 4,                    # basin ϵ-Limit criterion
iter::Bool  = false,                # toggle iteration mode
p::Number   = 0,                    # iteration color exponent
newt::Bool  = false,                # toggle Newton mode
m::Number   = 0,                    # Newton multiplicity factor
mandel::Bool= false,                # toggle Mandelbrot mode
seed::Number= 0.0+0.0im,            # Mandelbrot seed value
x0          = nothing,              # orbit starting point
orbit::Int  = 0,                    # orbit cobweb depth
depth::Int  = 1,                    # depth of function composition
cmap::String= ""                    # imshow color map

A Fatou set is a collection of complex valued orbits of an iterated function. To help illustrate this, an additional feature is a plot function designed to visualize real-valued-orbits. The program can be initialized with using Fatou, PyPlot or Makie or ImageInTerminal. For PyPlot the imshow and plot methods can be used, while for Makie the heatmap, contour, surface, and arrows methods can be used.

When using ImageInTerminal, the display of a Fatou.FilledSet will be plotted automatically in the terminal. The orbit method also has optional UnicodePlots compatibility. Additional plotting support can be added via Pull-Request by adding another Requires script to the __init__() function definition.

The following is a cobweb orbit plot of a function:

juliafill(:(z^2-0.67),∂=[-1.25,1.5],x0=1.25,orbit=17,depth=3,n=147) |> orbit

img/orbit.png

With fatou and plot it is simple to display a filled in Julia set:

c = -0.06 + 0.67im
nf = juliafill(:(z^2+$c),∂=[-1.5,1.5,-1,1],N=80,n=1501,cmap="gnuplot",iter=true)
plot(fatou(nf), bare=true)

img/filled-julia.png

It is also possible to switch to mandelbrot mode:

mandelbrot(:(z^2+c),n=800,N=20,∂=[-1.91,0.51,-1.21,1.21],cmap="gist_earth") |> fatou |> plot

img/mandelbrot.png

Fatou also provides basin to display the the Newton / Fatou basins using set notation in LaTeX in IJulia.

map(display,[basin(newton(:(z^3-1)),i) for i  1:3])

D1(ϵ)

D2(ϵ)

D3(ϵ)

Compute the Newton fractal Julia set for a function with annotated plot of iteration count:

nf = newton(:(z^3-1),n=800=0.1,N=25,iter=true,cmap="jet")
nf |> fatou |> plot
basin(nf,3)

img/newton.png

Generalized Newton fractal example:

nf = newton(:(sin(z)-1),m=1-1im,∂=[-2π/3,-π/3,-π/6/6],n=500,N=33,iter=true=0.05,cmap="cubehelix")
nf |> fatou |> plot
basin(nf,2)

img/generalized-newton.png

D2(ϵ)

View Explore Fatou sets & Fractals in Wiki for detailed examples.

Troubleshooting on Julia 1.0.1+

Note that Fatou is not compatible with Julia 1.0 but works on Julia 1.0.1 alright. Note that a stackoverflow error occurs on Julia 1.0.1+ when the Reduce package is precompiled with ENV["REDPRE"] flag set, therefore it is recommended to not set it. If you encounter an unsatisfiable requirement in the package manager, an easy workaround is to use dev Fatou instead of add Fatou.

fatou.jl's People

Contributors

chakravala avatar staticfloat avatar tkelman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fatou.jl's Issues

Questions about the mandelbrot implementation

Hi. I am looking at the source of Fatou.jl to understand how the implementation of the Mandelbrot visualization is faster. I have a couple of questions:

  1. The n variable used is for horizontal grid points. Is that the same as the num of pixels/coordinates calculated? So it calculates for 176x176 pixels by default?

  2. The N is UInt8, and it means the maximum iteration per coordinate (or complex coordinate) is just 255. I've read that you would need at least a value of 1000 for the visualization to be quite accurate. Is this actually restricted to 255 or am I just confusing N with max iteration?

sig abort on julia 1.0.1 with PyPlot on Mac OSX

Attempting to use the dev release of the Fatou package results in an abort trap of the Julia REPL:

julia> using Reduce,Fatou

julia> juliafill(:(z^2-0.67),∂=[-1.25,1.5],x0=1.25,orbit=17,depth=3,n=147) |> orbit
2018-10-28 15:07:06.348 julia[58486:18520528] -[NSApplication _setup:]: unrecognized selector sent to instance 0x7fe7c23b2480
2018-10-28 15:07:06.349 julia[58486:18520528] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSApplication _setup:]: unrecognized selector sent to instance 0x7fe7c23b2480'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff30a4f43d __exceptionPreprocess + 256
	1   libobjc.A.dylib                     0x00007fff5c960720 objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff30acc255 -[NSObject(NSObject) __retain_OA] + 0
	3   CoreFoundation                      0x00007fff309eead0 ___forwarding___ + 1486
	4   CoreFoundation                      0x00007fff309ee478 _CF_forwarding_prep_0 + 120
	5   libtk8.6.dylib                      0x0000000146e2e31d TkpInit + 413
	6   libtk8.6.dylib                      0x0000000146d8617e Initialize + 2622
	7   _tkinter.cpython-37m-darwin.so      0x0000000146bb0a0f _tkinter_create + 1183
	8   libpython3.7m.dylib                 0x000000012b64ac29 _PyMethodDef_RawFastCallKeywords + 681
	9   libpython3.7m.dylib                 0x000000012b64ad2d _PyCFunction_FastCallKeywords + 45
	10  libpython3.7m.dylib                 0x000000012b754714 call_function + 612
	11  libpython3.7m.dylib                 0x000000012b74b7fa _PyEval_EvalFrameDefault + 8138
	12  libpython3.7m.dylib                 0x000000012b749399 _PyEval_EvalCodeWithName + 3305
	13  libpython3.7m.dylib                 0x000000012b649b21 _PyFunction_FastCallDict + 481
	14  libpython3.7m.dylib                 0x000000012b64b514 _PyObject_Call_Prepend + 164
	15  libpython3.7m.dylib                 0x000000012b6b2eda slot_tp_init + 298
	16  libpython3.7m.dylib                 0x000000012b6bc5d7 type_call + 295
	17  libpython3.7m.dylib                 0x000000012b64a7e3 _PyObject_FastCallKeywords + 691
	18  libpython3.7m.dylib                 0x000000012b75477c call_function + 716
	19  libpython3.7m.dylib                 0x000000012b74b927 _PyEval_EvalFrameDefault + 8439
	20  libpython3.7m.dylib                 0x000000012b64a3de function_code_fastcall + 254
	21  libpython3.7m.dylib                 0x000000012b754786 call_function + 726
	22  libpython3.7m.dylib                 0x000000012b74b7fa _PyEval_EvalFrameDefault + 8138
	23  libpython3.7m.dylib                 0x000000012b749399 _PyEval_EvalCodeWithName + 3305
	24  libpython3.7m.dylib                 0x000000012b649b21 _PyFunction_FastCallDict + 481
	25  libpython3.7m.dylib                 0x000000012b64b514 _PyObject_Call_Prepend + 164
	26  libpython3.7m.dylib                 0x000000012b64cf24 method_call + 36
	27  libpython3.7m.dylib                 0x000000012b64af26 PyObject_Call + 246
	28  libpython3.7m.dylib                 0x000000012b74bb73 _PyEval_EvalFrameDefault + 9027
	29  libpython3.7m.dylib                 0x000000012b749399 _PyEval_EvalCodeWithName + 3305
	30  libpython3.7m.dylib                 0x000000012b649b21 _PyFunction_FastCallDict + 481
	31  ???                                 0x000000012a07cfda 0x0 + 5000122330
	32  ???                                 0x000000012a086567 0x0 + 5000160615
	33  ???                                 0x0000000148105178 0x0 + 5503996280
	34  libjulia.1.0.dylib                  0x0000000108b20ac3 jl_fptr_trampoline + 51
	35  ???                                 0x00000001480fcbb5 0x0 + 5503962037
	36  ???                                 0x00000001480fed15 0x0 + 5503970581
	37  ???                                 0x00000001480fca62 0x0 + 5503961698
	38  ???                                 0x00000001480fcab1 0x0 + 5503961777
	39  ???                                 0x00000001480fc37d 0x0 + 5503959933
	40  ???                                 0x00000001480fbd51 0x0 + 5503958353
	41  libjulia.1.0.dylib                  0x0000000108ce5ab8 do_call + 200
	42  libjulia.1.0.dylib                  0x0000000108ce45ac eval_body + 1228
	43  libjulia.1.0.dylib                  0x0000000108ce4af8 jl_interpret_toplevel_thunk_callback + 408
	44  libjulia.1.0.dylib                  0x0000000108b3768c enter_interpreter_frame + 28
	45  libjulia.1.0.dylib                  0x0000000108b516c2 jl_toplevel_eval_flex + 1282
	46  libjulia.1.0.dylib                  0x0000000108b31b2f jl_toplevel_eval_in + 463
	47  sys.dylib                           0x00000001122d64c2 japi1_eval_3925.clone_1 + 18
	48  sys.dylib                           0x000000011290126c japi1_#28_10143.clone_1.clone_2 + 364
	49  libjulia.1.0.dylib                  0x0000000108b3bc80 start_task + 352
)
libc++abi.dylib: terminating with uncaught exception of type NSException

signal (6): Abort trap: 6
in expression starting at no file:0
__pthread_kill at /usr/lib/system/libsystem_kernel.dylib (unknown line)
Allocations: 118133660 (Pool: 118103461; Big: 30199); GC: 261
Abort trap: 6

Plotting don't work with PyPlot

Hello, I'm new to Fatou.jl. This is a fancy project. But for the first try, I cannot make it work properly.

This is the environment and I use v1.6.0, the same error appears for both add PyPlot and dev PyPlot

(phys_poster) pkg> status
      Status ~/phys_poster/Project.toml
  [5f923234] Fatou v1.1.1 ~/.julia/dev/Fatou
  [e9467ef8] GLMakie v0.2.9
  [438e738f] PyCall v1.92.3
  [d330b81b] PyPlot v2.9.0 ~/.julia/dev/PyPlot

And this is the error trace (after using Fatou)

julia> using PyPlot
[ Info: Precompiling PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee]
┌ Warning: Error requiring PyPlot from Fatou
│   exception =
│    LoadError: syntax: malformed expression
│    Stacktrace:
│      [1] top-level scope
│        @ ~/.julia/dev/Fatou/src/pyplot.jl:4
│      [2] include(mod::Module, _path::String)
│        @ Base ./Base.jl:386
│      [3] include(x::String)
│        @ Fatou ~/.julia/dev/Fatou/src/Fatou.jl:1
│      [4] top-level scope
│        @ ~/.julia/packages/Requires/7Ncym/src/Requires.jl:40
│      [5] eval
│        @ ./boot.jl:360 [inlined]
│      [6] eval
│        @ ~/.julia/dev/Fatou/src/Fatou.jl:1 [inlined]
│      [7] (::Fatou.var"#20#35")()
│        @ Fatou ~/.julia/packages/Requires/7Ncym/src/require.jl:99
│      [8] err(f::Any, listener::Module, modname::String)
│        @ Requires ~/.julia/packages/Requires/7Ncym/src/require.jl:47
│      [9] (::Fatou.var"#19#34")()
│        @ Fatou ~/.julia/packages/Requires/7Ncym/src/require.jl:98
│     [10] withpath(f::Any, path::String)
│        @ Requires ~/.julia/packages/Requires/7Ncym/src/require.jl:37
│     [11] (::Fatou.var"#18#33")()
│        @ Fatou ~/.julia/packages/Requires/7Ncym/src/require.jl:97
│     [12] #invokelatest#2
│        @ ./essentials.jl:708 [inlined]
│     [13] invokelatest
│        @ ./essentials.jl:706 [inlined]
│     [14] foreach(f::typeof(Base.invokelatest), itr::Vector{Function})
│        @ Base ./abstractarray.jl:2141
│     [15] loadpkg(pkg::Base.PkgId)
│        @ Requires ~/.julia/packages/Requires/7Ncym/src/require.jl:27
│     [16] #invokelatest#2
│        @ ./essentials.jl:708 [inlined]
│     [17] invokelatest
│        @ ./essentials.jl:706 [inlined]
│     [18] require(uuidkey::Base.PkgId)
│        @ Base ./loading.jl:920
│     [19] require(into::Module, mod::Symbol)
│        @ Base ./loading.jl:901
│     [20] eval
│        @ ./boot.jl:360 [inlined]
│     [21] eval_user_input(ast::Any, backend::REPL.REPLBackend)
│        @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:139
│     [22] repl_backend_loop(backend::REPL.REPLBackend)
│        @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:200
│     [23] start_repl_backend(backend::REPL.REPLBackend, consumer::Any)
│        @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:185
│     [24] run_repl(repl::REPL.AbstractREPL, consumer::Any; backend_on_current_task::Bool)
│        @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:317
│     [25] run_repl(repl::REPL.AbstractREPL, consumer::Any)
│        @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:305
│     [26] (::Base.var"#874#876"{Bool, Bool, Bool})(REPL::Module)
│        @ Base ./client.jl:387
│     [27] #invokelatest#2
│        @ ./essentials.jl:708 [inlined]
│     [28] invokelatest
│        @ ./essentials.jl:706 [inlined]
│     [29] run_main_repl(interactive::Bool, quiet::Bool, banner::Bool, history_file::Bool, color_set::Bool)
│        @ Base ./client.jl:372
│     [30] exec_options(opts::Base.JLOptions)
│        @ Base ./client.jl:302
│     [31] _start()
│        @ Base ./client.jl:485in expression starting at /home/huzf/.julia/dev/Fatou/src/pyplot.jl:4
└ @ Requires ~/.julia/packages/Requires/7Ncym/src/require.jl:49

Some examples in `README` still don't work with `PyPlot`

After #11, there is some other errors. Below is an example, and similar situations like no method matching iterate(::Fatou.Rectangle) also appear elsewhere.

julia> newton(:(z^3-1),n=800=0.1,N=25,iter=true,cmap="jet") |> fatou |> plot
  0.137883 seconds (55.66 k allocations: 3.189 MiB, 56.83% compilation time)
ERROR: (in a Julia function called from Python)
JULIA: MethodError: no method matching iterate(::Fatou.Rectangle)
Closest candidates are:
  iterate(!Matched::Union{LinRange, StepRangeLen}) at range.jl:664
  iterate(!Matched::Union{LinRange, StepRangeLen}, !Matched::Int64) at range.jl:664
  iterate(!Matched::T) where T<:Union{Base.KeySet{var"#s79", var"#s78"} where {var"#s79", var"#s78"<:Dict}, Base.ValueIterator{var"#s77"} where var"#s77"<:Dict} at dict.jl:693
  ...
Stacktrace:
  [1] jlwrap_iterator(o::Fatou.Rectangle)
    @ PyCall ~/.julia/packages/PyCall/BD546/src/pyiterator.jl:144
  [2] pyjlwrap_getiter(self_::Ptr{PyCall.PyObject_struct})
    @ PyCall ~/.julia/packages/PyCall/BD546/src/pyiterator.jl:125
  [3] macro expansion
    @ ~/.julia/packages/PyCall/BD546/src/exception.jl:95 [inlined]
  [4] #107
    @ ~/.julia/packages/PyCall/BD546/src/pyfncall.jl:43 [inlined]
  [5] disable_sigint
    @ ./c.jl:458 [inlined]
  [6] __pycall!
    @ ~/.julia/packages/PyCall/BD546/src/pyfncall.jl:42 [inlined]
  [7] _pycall!(ret::PyCall.PyObject, o::PyCall.PyObject, args::Tuple{Matrix{UInt16}}, nargs::Int64, kw::PyCall.PyObject)
    @ PyCall ~/.julia/packages/PyCall/BD546/src/pyfncall.jl:29
  [8] _pycall!(ret::PyCall.PyObject, o::PyCall.PyObject, args::Tuple{Matrix{UInt16}}, kwargs::Base.Iterators.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:cmap, :extent), Tuple{String, Fatou.Rectangle}}})
    @ PyCall ~/.julia/packages/PyCall/BD546/src/pyfncall.jl:11
  [9] #pycall#113
    @ ~/.julia/packages/PyCall/BD546/src/pyfncall.jl:83 [inlined]
 [10] imshow(args::Matrix{UInt16}; kws::Base.Iterators.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:cmap, :extent), Tuple{String, Fatou.Rectangle}}})
    @ PyPlot ~/.julia/packages/PyPlot/XHEG0/src/PyPlot.jl:177
 [11] imshow(K::Fatou.FilledSet{SyntaxTree.var"#41#42", SyntaxTree.var"#43#44", SyntaxTree.var"#45#46", false, true, false, false}; cmap::String, bare::Bool)
    @ Fatou ~/.julia/dev/Fatou/src/pyplot.jl:9
 [12] #plot#40
    @ ~/.julia/dev/Fatou/src/pyplot.jl:4 [inlined]
 [13] plot
    @ ~/.julia/dev/Fatou/src/pyplot.jl:4 [inlined]
 [14] |>(x::Fatou.FilledSet{SyntaxTree.var"#41#42", SyntaxTree.var"#43#44", SyntaxTree.var"#45#46", false, true, false, false}, f::typeof(plot))
    @ Base ./operators.jl:858
 [15] top-level scope
    @ REPL[12]:1
 [16] eval
    @ ./boot.jl:360 [inlined]
 [17] eval_user_input(ast::Any, backend::REPL.REPLBackend)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:139
 [18] repl_backend_loop(backend::REPL.REPLBackend)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:200
 [19] start_repl_backend(backend::REPL.REPLBackend, consumer::Any)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:185
 [20] run_repl(repl::REPL.AbstractREPL, consumer::Any; backend_on_current_task::Bool)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:317
 [21] run_repl(repl::REPL.AbstractREPL, consumer::Any)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:305
 [22] (::Base.var"#874#876"{Bool, Bool, Bool})(REPL::Module)
    @ Base ./client.jl:387
 [23] #invokelatest#2
    @ ./essentials.jl:708 [inlined]
 [24] invokelatest
    @ ./essentials.jl:706 [inlined]
 [25] run_main_repl(interactive::Bool, quiet::Bool, banner::Bool, history_file::Bool, color_set::Bool)
    @ Base ./client.jl:372
 [26] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:302
 [27] _start()
    @ Base ./client.jl:485
Stacktrace:
  [1] pyerr_check
    @ ~/.julia/packages/PyCall/BD546/src/exception.jl:62 [inlined]
  [2] pyerr_check
    @ ~/.julia/packages/PyCall/BD546/src/exception.jl:66 [inlined]
  [3] _handle_error(msg::String)
    @ PyCall ~/.julia/packages/PyCall/BD546/src/exception.jl:83
  [4] macro expansion
    @ ~/.julia/packages/PyCall/BD546/src/exception.jl:97 [inlined]
  [5] #107
    @ ~/.julia/packages/PyCall/BD546/src/pyfncall.jl:43 [inlined]
  [6] disable_sigint
    @ ./c.jl:458 [inlined]
  [7] __pycall!
    @ ~/.julia/packages/PyCall/BD546/src/pyfncall.jl:42 [inlined]
  [8] _pycall!(ret::PyCall.PyObject, o::PyCall.PyObject, args::Tuple{Matrix{UInt16}}, nargs::Int64, kw::PyCall.PyObject)
    @ PyCall ~/.julia/packages/PyCall/BD546/src/pyfncall.jl:29
  [9] _pycall!(ret::PyCall.PyObject, o::PyCall.PyObject, args::Tuple{Matrix{UInt16}}, kwargs::Base.Iterators.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:cmap, :extent), Tuple{String, Fatou.Rectangle}}})
    @ PyCall ~/.julia/packages/PyCall/BD546/src/pyfncall.jl:11
 [10] #pycall#113
    @ ~/.julia/packages/PyCall/BD546/src/pyfncall.jl:83 [inlined]
 [11] imshow(args::Matrix{UInt16}; kws::Base.Iterators.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:cmap, :extent), Tuple{String, Fatou.Rectangle}}})
    @ PyPlot ~/.julia/packages/PyPlot/XHEG0/src/PyPlot.jl:177
 [12] imshow(K::Fatou.FilledSet{SyntaxTree.var"#41#42", SyntaxTree.var"#43#44", SyntaxTree.var"#45#46", false, true, false, false}; cmap::String, bare::Bool)
    @ Fatou ~/.julia/dev/Fatou/src/pyplot.jl:9
 [13] #plot#40
    @ ~/.julia/dev/Fatou/src/pyplot.jl:4 [inlined]
 [14] plot
    @ ~/.julia/dev/Fatou/src/pyplot.jl:4 [inlined]
 [15] |>(x::Fatou.FilledSet{SyntaxTree.var"#41#42", SyntaxTree.var"#43#44", SyntaxTree.var"#45#46", false, true, false, false}, f::typeof(plot))
    @ Base ./operators.jl:858
 [16] top-level scope
    @ REPL[12]:1

Plotting recipe missing. v1.0.1

The following code, which I came across on this thread, throws an error:

julia> mandelbrot(:(z^2+c),n=700,N=20,∂=[-1.91,0.51,-1.21,1.21],iter=true,cmap="gist_earth") |> fatou |> plot

  0.540635 seconds (19.21 M allocations: 509.339 MiB, 27.11% gc time)
ERROR: No user recipe defined for Fatou.FilledSet{getfield(SyntaxTree, Symbol("##13#14")),getfield(SyntaxTree, Symbol("##15#16")),getfield(SyntaxTree, Symbol("##17#18")),true,false}
[...]

Edit: Looks like I had Plots imported, which was conflicting with this package's dependency on PyPlots. False alarm!

Plotting errors using example sets

I'm seeing

ERROR: PlotMethodError: no plot method for arguments (::Fatou.FilledSet{SyntaxTree.var"#17#18",SyntaxTree.var"#19#20",SyntaxTree.var"#21#22",false,false,false,false}). To support these arguments, define
plot!(::Combined{Any,S} where S<:Tuple{Fatou.FilledSet{SyntaxTree.var"#17#18",SyntaxTree.var"#19#20",SyntaxTree.var"#21#22",false,false,false,false}})
Available methods are:
plot!(plot::Combined{Any,var"#s29"} where var"#s29"<:Tuple{AbstractArray{var"#s330",1} where var"#s330"<:Complex}) in Makie at /Users/ryanrightmer/.julia/packages/Makie/PFSZS/src/basic_recipes/convenience_functions.jl:1

when attempting to use some of the examples in the README. Do I have a bad configuration or am I perhaps setting up the examples incorrectly?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.