-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
Improve CairoMakie lines with array colors #3141
Conversation
Missing reference imagesFound 2 new images without existing references. |
Compile Times benchmarkNote, that these numbers may fluctuate on the CI servers, so take them with a grain of salt. All benchmark results are based on the mean time and negative percent mean faster than the base branch. Note, that GLMakie + WGLMakie run on an emulated GPU, so the runtime benchmark is much slower. Results are from running: using_time = @ctime using Backend
# Compile time
create_time = @ctime fig = scatter(1:4; color=1:4, colormap=:turbo, markersize=20, visible=true)
display_time = @ctime Makie.colorbuffer(display(fig))
# Runtime
create_time = @benchmark fig = scatter(1:4; color=1:4, colormap=:turbo, markersize=20, visible=true)
display_time = @benchmark Makie.colorbuffer(display(fig))
|
# this color is like the previous | ||
if !this_nan | ||
# and this is not nan, so line_to and set prev_continued | ||
this_linewidth != prev_linewidth && error("Encountered two different linewidth values $prev_linewidth and $this_linewidth in `lines` at index $(i-1). Different linewidths in one line are only permitted in CairoMakie when separated by a NaN point.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a bit off-topic, but is this a restriction from Cairo or could we have per-element linewidths here? GLMakie supports those so it would be nice if it worked in CairoMakie too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could do it via polygons I guess, then we would have to handle all joins manually. But normal strokes don't do it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't look at the changes in detail, but didn't find any regressions in the refimages :)
Only thing I found is that the dots in the new testimages look a bit too wide, more like dashes. Not sure what's going on there, in other references the two backends seem to match better. |
Description
Fixes #3136
This now tries to draw as many points of a
lines
plot continuously as possible in CairoMakie, which reduces the number of junction points that are visible when alpha colors are used and improves the look of dashes with solid-color lines as well.Before
After
Type of change
Delete options that do not apply:
Checklist