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

linewidth for linesegments in CairoMakie #2205

Closed
hexaeder opened this issue Aug 8, 2022 · 4 comments
Closed

linewidth for linesegments in CairoMakie #2205

hexaeder opened this issue Aug 8, 2022 · 4 comments

Comments

@hexaeder
Copy link
Contributor

hexaeder commented Aug 8, 2022

In CairoMakie 0.8.13, the line ends plottet by linesegments look differently depending on whether linewidth is given as a vector or not.

segs = Point2f.([(0, 0), (0,1), (1,0), (1,1)])
linesegments(segs; linewidth = 25)
linesegments(segs; linewidth = [10, 25])

results in
grafik

@jkrumbiegel
Copy link
Member

Not sure why this changed exactly, but in CairoMakie there's been a hack for quite some time which changes the line caps to round if it needs to draw connected lines out of multiple segments (because butted caps give ugly gaps). This shouldn't apply to linesegments though I'd say.

@jkrumbiegel
Copy link
Member

Ideally one could of course pass linecap style manually, but glmakie doesn't have the capability to draw different ones as far as I know.

@hexaeder
Copy link
Contributor Author

hexaeder commented Aug 8, 2022

Not sure why this changed exactly

This behaviour might have been like this forever -- I didn't test it with previous versions. I just noticed while creating a new GraphMakie reference test and was confused... for my usecase it doesn't actually mater.

@ffreyer
Copy link
Collaborator

ffreyer commented May 24, 2024

The behavior is the same in 0.21 now, after #2536, and you can control which linecap is chosen.

@ffreyer ffreyer closed this as completed May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

3 participants