MakieOrg / Makie.jl

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

`NaN` in roation breaks entire axis #4041

Open hexaeder opened 1 month ago

hexaeder commented 1 month ago

This is not necessarily a bug because it only appears when you're using Makie wrong, so please feel free to close it. Passing NaN as a rotation does not make any sense, and you shouldn't do it. However, I was surprised that it does not only break the plot but also the entire axis in funny ways. See the following MWE where the axis disappears, or the second video in this comment where the axis flips upside down.

using Pkg
pkg"activate --temp"
pkg"add CairoMakie"
using CairoMakie

fig = Figure()
ax = Axis(fig[1,1])
scatter!(ax, rand(Point2f, 10))
fig # this is fine
scatter!(ax, rand(Point2f,3); rotation=[NaN, 0, 90])
fig # this isn't

image

jkrumbiegel commented 1 month ago

Good point, CairoMakie should throw an informative error here, it's Cairo that does weird things when it gets passed a NaN in the wrong place

ffreyer commented 2 weeks ago

W/GLMakie break less but still deserve an error I think.