Makie.jl icon indicating copy to clipboard operation
Makie.jl copied to clipboard

`linewidth` for `linesegments` in CairoMakie

Open hexaeder opened this issue 3 years ago • 3 comments

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

hexaeder avatar Aug 08 '22 10:08 hexaeder

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 avatar Aug 08 '22 10:08 jkrumbiegel

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.

jkrumbiegel avatar Aug 08 '22 10:08 jkrumbiegel

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.

hexaeder avatar Aug 08 '22 11:08 hexaeder