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

Legend patch stroke has the wrong z value or drawing order #4512

Open
3 tasks done
rafaqz opened this issue Oct 23, 2024 · 1 comment
Open
3 tasks done

Legend patch stroke has the wrong z value or drawing order #4512

rafaqz opened this issue Oct 23, 2024 · 1 comment

Comments

@rafaqz
Copy link
Contributor

rafaqz commented Oct 23, 2024

  • what version of Makie are you running? (]st -m Makie) 0.21.6
  • can you reproduce the bug with a fresh environment ? (]activate --temp; add Makie)
  • What platform + GPU are you on? Linux / Nvidia

Using CairoMakie (and maybe others) Legend patchstroke seems to have a tiny bug. In this image the line is underneath the fill color rather than above it. This means the width is only half what you specify, and if your fill is a bit transparent you can see it like this.

Image

@rafaqz rafaqz added the bug label Oct 23, 2024
@asinghvi17
Copy link
Member

asinghvi17 commented Oct 23, 2024

I can't reproduce with bare poly:

poly(Rect2f(0,0,1,1); strokewidth=10, strokecolor=:black, color=(:blue, 0.5))

but it looks like Legend does create a Box around patches:

rect = Box(scene; color=e.patchcolor, strokecolor=e.patchstrokecolor, strokewidth=e.patchstrokewidth,
width=lift(x -> x[1], blockscene, e.patchsize), height=lift(x -> x[2], blockscene, e.patchsize))

so maybe the Box code needs some changes. Or we could translate the Box up by some amount so it's always on top of the marker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants