-
-
Notifications
You must be signed in to change notification settings - Fork 317
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
Fix errorbar and bracket interaction with transform functions #3012
Conversation
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))
|
# Avoid scale!() / translate!() / rotate!() to affect these | ||
series!(pl, bp; space = :pixel, solid_color = pl.color, linewidth = pl.linewidth, | ||
linestyle = pl.linestyle, transformation = Transformation()) | ||
text!(pl, textpoints, text = texts, space = :pixel, align = pl.align, offset = textoffset_vec, | ||
fontsize = pl.fontsize, font = pl.font, rotation = autorotations, color = pl.textcolor, | ||
justification = pl.justification) | ||
justification = pl.justification, model = Mat4f(I)) |
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.
Currently space = :pixel
still includes model transformation (at least in GLMakie). Since plot_to_screen
deals with them now, they'd be included twice. To prevent that I'm overwriting model/transformation. I'm using transformation for series because model doesn't get passed down.
whiskers = lift(plot, linesegpairs, scene.camera.projectionview, | ||
scene.camera.pixel_space, whiskerwidth) do pairs, _, _, whiskerwidth |
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.
With camera.pixel_space
this sometimes fails to update correctly when zooming or resizing. scene.px_area
works fine.
Missing reference imagesFound 1 new images without existing references. |
Description
Fixes #3005 and #1455
I replaced
scene_to_screen
andscreen_to_scene
withplot_to_screen
andscreen_to_plot
here, which includes applying the model matrix, transform function and considersplot.space
. I changed the name because these functions are more closely related to what a plot is doing, and a plot can have different transformations (and coordinate space) than a scene.I'm also hoping it trips up CI if I missed some calls to the old functions.This now also fixes some issues with bracket. On master it doesn't react to window resizing and it doesn't include transformations when calculating its positions.
Type of change
Checklist