Skip to content
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

add appropriate default marker for arrows legend entry #4873

Open
japhir opened this issue Mar 18, 2025 · 0 comments
Open

add appropriate default marker for arrows legend entry #4873

japhir opened this issue Mar 18, 2025 · 0 comments
Labels
enhancement Feature requests and enhancements

Comments

@japhir
Copy link
Contributor

japhir commented Mar 18, 2025

Feature description

The default legend marker for the arrows function doesn't seem to work as I would expect:

In 2d it shows a line with a triangle in the middle

while in 3d it doesn't show any symbol

@jkrumbiegel mentioned on slack that:
it just falls back to lines + scatter legend
so nothing special was implemented for either case

MWE:

using GLMakie
fig = Figure()
ax = Axis(fig[1, 1]) 
a = arrows!(ax, [0],[0], [1],[1], label = "Hi there")
axislegend(position = :lt)

fig = Figure()
ax = Axis3(fig[1, 1], aspect = :data) 
o = Point3f(0.0, 0.0, 0.0)
n = Vec3f(0, 0, 1)
a = arrows!(ax,[o], [n], label = "Hi there")
a.plots[1].transform_marker = true
a.plots[2].transform_marker = true
axislegend(position = :lt)

For plot types, please add an image of how it should look like

for 2d: a small arrow? probably at 45° or so?

for 3d: a small 3d arrow? probably at 45° or so?

@japhir japhir added the enhancement Feature requests and enhancements label Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests and enhancements
Projects
None yet
Development

No branches or pull requests

1 participant