MakieOrg / Makie.jl

Interactive data visualizations and plotting in Julia
https://docs.makie.org/stable
MIT License
2.43k stars 312 forks source link

Compose different spaces – data, relative, pixel, ... #4407

Open aplavin opened 2 months ago

aplavin commented 2 months ago

Would be convenient and generally useful to enable defining coordinate with a mix of different "spaces". Is it feasible to add a type for that or something? Potential examples include:

(data(123), relative(0.5))
(data(123) + pixel(3), data(456))
(data(123) + relative(0.01), data(456))
(data(123), data(456)) .+ (pixel(2), pixel(2))
ffreyer commented 2 months ago

I tried adding this in #1730. Iirc I wasn't happy with how specific the conditions get - you can't mix coordinates until they are in the same space, i.e. no rotations, practically no 3D, and transform functions probably need to be per-element.