Skip to content

Commit

Permalink
Attempt to fix plotting docs bug
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewGibbs committed Nov 12, 2023
1 parent 56d02d4 commit 9419299
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 19 deletions.
1 change: 1 addition & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ using Documenter
makedocs(
sitename = "IFSintegrals.jl",
modules = [IFSintegrals],
checkdocs=:none,
pages=[
"Home" => "index.md",
"Constructing fractals" => "makeIFS.md",
Expand Down
3 changes: 0 additions & 3 deletions docs/src/plotting.md
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
```@docs
plot
```
26 changes: 10 additions & 16 deletions src/plotting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,27 +107,16 @@ function adjust_defaults(kwargs)
return kwargs_dict
end


"""
plot(Γ::SelfSimilarFractal; markersize=0.1, color="black")
Provides a simple sketch of the parent_measure Γ, by repeatedly applying the IFS.
Overload of Plot.jl method 'plot'.
The input is now a SelfSimilarFractal;
the image is approximated by repeatedly applying the IFS to the barycentre.
Most of the standard formatting commands can still be applied.
See also: [`plot!`](@ref)
"""
# function plot(Γ::FractalMeasure; kwargs...)#mem_const = 100000, kwargs...)
# # plot()
# p = plot!(Γ; kwargs...)
# # # println(kwargs)
# # x,y = fractal_pre_plot(Γ,mem_const)
# # # scatter(x,y;kwargs...)
# # # kwargs = adjust_defaults(kwargs)
# # scatter(x,y;adjust_defaults(kwargs)...)
# return p
# end

"""
plot!(Γ::SelfSimilarFractal; markersize=0.1, color="black")
Similar to [`draw`](@ref), except it will draw on the current image.
"""
function plot::FractalMeasure; mem_const = 100000, mswidth=0, kwargs...)
xyz = fractal_pre_plot(Γ,mem_const)
p = scatter(xyz;
Expand All @@ -136,6 +125,10 @@ function plot(Γ::FractalMeasure; mem_const = 100000, mswidth=0, kwargs...)
return p
end

"""
plot!(Γ::SelfSimilarFractal; markersize=0.1, color="black")
Similar to [`plot`](@ref), except it will draw on the current image.
"""
function plot!::FractalMeasure; mem_const = 100000, mswidth=0, kwargs...)
xyz = fractal_pre_plot(Γ,mem_const)
p = scatter!(xyz;
Expand All @@ -144,6 +137,7 @@ function plot!(Γ::FractalMeasure; mem_const = 100000, mswidth=0, kwargs...)
return p
end


# function plot!(Γ::UnionInvariantMeasure; mem_const = 100000, kwargs...)
# X = Vector{Float64}[]
# Y = Vector{Float64}[]
Expand Down

0 comments on commit 9419299

Please sign in to comment.