Makie.jl
Makie.jl copied to clipboard
`linewidth` for `linesegments` in CairoMakie
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

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.
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.
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.