From 9419299225df2894fd574a1179d4da41f994cb02 Mon Sep 17 00:00:00 2001 From: Andrew Gibbs Date: Sun, 12 Nov 2023 09:50:44 +0000 Subject: [PATCH] Attempt to fix plotting docs bug --- docs/make.jl | 1 + docs/src/plotting.md | 3 --- src/plotting.jl | 26 ++++++++++---------------- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index cfad1e8..8c4f132 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -5,6 +5,7 @@ using Documenter makedocs( sitename = "IFSintegrals.jl", modules = [IFSintegrals], + checkdocs=:none, pages=[ "Home" => "index.md", "Constructing fractals" => "makeIFS.md", diff --git a/docs/src/plotting.md b/docs/src/plotting.md index ca0fb9c..e69de29 100644 --- a/docs/src/plotting.md +++ b/docs/src/plotting.md @@ -1,3 +0,0 @@ -```@docs -plot -``` \ No newline at end of file diff --git a/src/plotting.jl b/src/plotting.jl index e2d28c2..d8b9dcd 100644 --- a/src/plotting.jl +++ b/src/plotting.jl @@ -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; @@ -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; @@ -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}[]