You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the inability to use Measurement objects with this package is due to what seems to be an oversight in Measurements.jl. Specifically, AOG callstypemin on a Measurement for which no method is defined.
I've already opened a Pull Request in the Measurements repository to address this. In the meantime, until the fix is merged, you can add the following after loading Measurements.
Base.typemin(::Type{Measurements.Measurement{T}}) where {T<:AbstractFloat} =typemin(T)
Example
using CairoMakie
using AlgebraOfGraphics
using Measurements
Base.typemin(::Type{Measurements.Measurement{T}}) where {T<:AbstractFloat} =typemin(T)
x =collect(0:.5:4) .± .1
y =sin.(x)
plot = (
mapping(x,y) *visual(Scatter, color =:crimson) +mapping(x,y,x) *visual(Errorbars, color=:green, direction =:x, whiskerwidth =10) +mapping(x,y,y) *visual(Errorbars, color=:blue, direction =:y, whiskerwidth =10)
)|>draw
interesting that this works, I guess it's a little by accident. AoG is not very good with foreign types that are connected to special recipes because the logic that AoG needs to run, determining scales with min and max, checking that different inputs work meaningfully together, is unaware of a later convert that Makie might run. mapping(x, y, x) is definitely a bit weird from AoG's perspective because it has no way of knowing that you mean the x value component with the first x but the x error component with the second. That just happens later in Makie unbeknownst to AoG
Activity
mangelmauriz commentedon Sep 19, 2026
Currently, the inability to use
Measurementobjects with this package is due to what seems to be an oversight in Measurements.jl. Specifically, AOG callstypeminon aMeasurementfor which no method is defined.I've already opened a Pull Request in the Measurements repository to address this. In the meantime, until the fix is merged, you can add the following after loading Measurements.
Example
jkrumbiegel commentedon Sep 20, 2026
interesting that this works, I guess it's a little by accident. AoG is not very good with foreign types that are connected to special recipes because the logic that AoG needs to run, determining scales with min and max, checking that different inputs work meaningfully together, is unaware of a later convert that Makie might run.
mapping(x, y, x)is definitely a bit weird from AoG's perspective because it has no way of knowing that you mean the x value component with the first x but the x error component with the second. That just happens later in Makie unbeknownst to AoG