-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ilabels not inside nodes in 3D #192
Comments
Ah yes, the problem is the following: the text plot is drawn before the scatter plot, because the scatter plot markersize depends on the glyph size of the ilabels. Since the node plot is defined later, its markers would overdraw the labels. To circumvent this, we translate the ilabels plot +1 in z direction Line 254 in 85d4a58
which is essentially taken from the docs. Not a problem in 2d but quite the problem in 3d... |
Hmm, maybe define a depth_shift? But that might not work in Cairo...would have to investigate. FerriteViz.jl does this. |
using Pkg
pkg"activate --temp"
pkg"add GLMakie"
using GLMakie
pos = Point3{Float32}[(0,0,0),(1,0,0),(0,1,0),(0,0,1)]
labels = ["o", "x", "y", "z"]
fig = Figure()
ax = LScene(fig[1,1])
text!(ax, pos; text=labels, align=(:center,:center), depth_shift=1)
scatter!(ax, pos; markersize=50, depth_shift=-1) |
Pretty much as the title says, when I try to use ilabels in 3D layouts the graph works and I do get labels but they're seemingly all offset by a large amount in the z direction. Maybe I'm just not using something correctly but it at least looks like a bug, I'm attaching an image with the resulting plot.
The text was updated successfully, but these errors were encountered: