Skip to content

Commit

Permalink
Update layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanjohnharris committed Apr 29, 2024
1 parent 5d0a413 commit 077c571
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
7 changes: 7 additions & 0 deletions src/Foresight.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ using Requires
# end

export foresight, importall, freeze!, clip, hidexaxis!, hideyaxis!, axiscolorbar,
reverselegend!,
scientific, lscientific

"""
Expand Down Expand Up @@ -256,6 +257,12 @@ function beep()
end
end

function reverselegend!(l::Legend)
entrygroups = l.entrygroups[]
entrygroups[1][2] .= entrygroups[1][2] |> reverse
l.entrygroups[] = entrygroups
end

"""
importall(module)
Expand Down
8 changes: 4 additions & 4 deletions src/Layouts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ import Makie.GridLayoutBase.GridContent
# * A set of consistent figure layouts

function OnePanel(args...; kwargs...)
f = Figure(args...; size = (360, 360))
f = Figure(args...; size = (360, 300))
return f
end
function TwoPanel(args...; kwargs...)
f = Figure(args...; size = (720, 320))
f = Figure(args...; size = (720, 300))
return f
end
function FourPanel(args...; kwargs...)
f = Figure(args...; size = (720, 640))
f = Figure(args...; size = (720, 600))
return f
end
function SixPanel(args...; kwargs...)
f = Figure(args...; size = (720, 960))
f = Figure(args...; size = (720, 900))
return f
end

Expand Down

0 comments on commit 077c571

Please sign in to comment.