ExampleModule.jl

(source code)

This example can be used for documentation generation with Literate.jl via the ExampleJuggler.docmodules method.

module ExampleModule

ismakie(Plotter::Any) = false
ismakie(Plotter::Module) = isdefined(Plotter, :Makie)

using PkgDependency
using ExampleJuggler
using Test

function main(; Plotter = nothing)
    x, fx = mock_x()
    @show maximum(fx)
    if ismakie(Plotter)
        p = Plotter.lines(x, fx)
        Plotter.display(p)
        if isinteractive()
            print("press return to continue>")
            readline()
        end
    end

    x, t, fxt = mock_xt()
    if ismakie(Plotter)
        p = Plotter.heatmap(x, t, fxt)
        Plotter.display(p)
    end
    @show maximum(fxt)
    maximum(fx), maximum(fxt)
end


end

This page was generated using Literate.jl.