This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f = Figure() | |
[Axis(f[i, j], width = 300, height = 250) for i in 1:3, j in 1:3] | |
sz = ceil.(Int, GridLayoutBase.determinedirsize.( | |
Ref(f.layout), | |
(GridLayoutBase.Col(), GridLayoutBase.Row()))) | |
resize!(f.scene, sz) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@recipe(Stairs) do scene | |
a = Attributes( | |
step = :pre, # :center :post | |
) | |
merge(a, AbstractPlotting.default_theme(scene, Lines)) | |
end | |
AbstractPlotting.conversion_trait(x::Type{<: Stairs}) = AbstractPlotting.PointBased() | |
function AbstractPlotting.plot!(p::Stairs{<:Tuple{<:AbstractVector{<:Point2}}}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct IntegerTicks end | |
MakieLayout.get_tickvalues(::IntegerTicks, vmin, vmax) = ceil(Int, vmin) : floor(Int, vmax) | |
lines(0.01:0.001:0.99, axis = (yscale = log10, yticks = LogTicks(IntegerTicks()))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
measures = ["Endurance", "Coordination", "Speed", "Power Low", "Power Up"] | |
groups = ["boys", "girls"] | |
x = LinRange(-8, 9, 15) | |
f = Figure(resolution = (1000, 500)) | |
axs = [Axis(f[1, i]) for i in 1:length(measures)] | |
for (i, m) in enumerate(measures) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Legendre, GLMakie | |
using GeometryBasics, LinearAlgebra, StatsBase | |
using AbstractPlotting | |
using AbstractPlotting: get_dim, surface_normals | |
function Y(θ, ϕ, l, m) | |
if m < 0 | |
return (-1)^m * √2 * Nlm(l, abs(m)) * Plm(l, abs(m), cos(θ)) * sin(abs(m)*ϕ) | |
elseif m == 0 | |
return sqrt((2*l+1)/4π)*Plm(l, m, cos(θ)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using GLMakie | |
f = Figure(resolution = (1000, 1000)) | |
ax = Axis(f[1, 1], aspect = 1, limits = (-1, 1, -1, 1)) | |
points = Node(Point2f0[]) | |
colors = Node(Bool[]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this looks kind of close | |
set_theme!( | |
font = "Arial", | |
fontsize = 12, | |
Axis = ( | |
backgroundcolor = :gray92, | |
xgridcolor = :white, | |
ygridcolor = :white, | |
xminorgridcolor = (:white, 0.5), | |
xminorgridvisible = true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@recipe(Histstep, values) do scene | |
Attributes( | |
bins = 15, # Int or iterable of edges | |
normalization = :none | |
) | |
end | |
function AbstractPlotting.plot!(plot::Histstep) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using GLMakie | |
set_window_config!(float = true) | |
# | |
scene, layout = layoutscene(resolution = (1000, 1000)) | |
offscreen_gl = GridLayout(bbox = BBox(-500, -400, -500, -400)) | |
axs = layout[] = [LAxis(scene, title = string(i)) for i in CartesianIndices((2, 2))] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using AbstractPlotting | |
using AbstractPlotting.MakieLayout | |
using GLMakie | |
set_window_config!(float = true) | |
## | |
scene, layout = layoutscene(resolution = (1000, 800)) | |