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

Fix invalid range logscale #3077

Closed
wants to merge 5 commits into from
Closed

Conversation

SimonDanisch
Copy link
Member

@SimonDanisch SimonDanisch commented Jul 20, 2023

Continuation of #1671
Throws proper error for:

lines(1:10,1:10, axis=(; limits=(1,1,1,5))

@SimonDanisch SimonDanisch mentioned this pull request Jul 20, 2023
2 tasks
@MakieBot
Copy link
Collaborator

MakieBot commented Jul 20, 2023

Compile Times benchmark

Note, 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))
using create display create display
GLMakie 14.35s (14.22, 14.55) 0.11+- 1.27s (1.25, 1.33) 0.03+- 878.60ms (852.83, 924.19) 24.23+- 12.83ms (12.72, 13.07) 0.12+- 112.15ms (110.58, 113.54) 1.16+-
master 14.39s (14.18, 14.70) 0.17+- 1.32s (1.31, 1.34) 0.01+- 862.41ms (850.98, 875.66) 8.47+- 12.77ms (12.72, 12.84) 0.04+- 111.08ms (109.79, 112.46) 0.96+-
evaluation -0.23%, -0.03s invariant (-0.24d, 0.67p, 0.14std) -3.70%, -0.05s faster ✓ (-2.28d, 0.00p, 0.02std) +1.84%, 16.2ms invariant (0.89d, 0.14p, 16.35std) +0.44%, 0.06ms invariant (0.61d, 0.29p, 0.08std) +0.95%, 1.07ms invariant (1.00d, 0.09p, 1.06std)
CairoMakie 11.01s (10.84, 11.37) 0.19+- 1.10s (1.08, 1.11) 0.01+- 232.64ms (226.46, 242.48) 5.96+- 10.96ms (10.70, 11.38) 0.22+- 6.58ms (6.42, 6.75) 0.11+-
master 11.08s (10.92, 11.49) 0.20+- 1.12s (1.10, 1.15) 0.02+- 221.50ms (214.63, 228.32) 5.71+- 10.99ms (10.78, 11.35) 0.20+- 6.64ms (6.50, 6.78) 0.11+-
evaluation -0.68%, -0.08s invariant (-0.38d, 0.49p, 0.20std) -1.82%, -0.02s invariant (-1.19d, 0.05p, 0.02std) +4.79%, 11.14ms slower X (1.91d, 0.00p, 5.84std) -0.30%, -0.03ms invariant (-0.16d, 0.77p, 0.21std) -0.94%, -0.06ms invariant (-0.56d, 0.32p, 0.11std)
WGLMakie 15.94s (15.58, 16.36) 0.26+- 1.46s (1.41, 1.53) 0.04+- 14.29s (14.02, 14.57) 0.21+- 19.38ms (16.49, 28.49) 4.14+- 1.44s (1.40, 1.48) 0.03+-
master 16.10s (15.71, 16.51) 0.26+- 1.49s (1.42, 1.57) 0.06+- 14.53s (14.28, 14.84) 0.22+- 17.49ms (16.98, 18.40) 0.57+- 1.42s (1.38, 1.47) 0.03+-
evaluation -1.03%, -0.16s invariant (-0.62d, 0.27p, 0.26std) -1.89%, -0.03s invariant (-0.52d, 0.35p, 0.05std) -1.66%, -0.24s invariant (-1.08d, 0.07p, 0.22std) +9.75%, 1.89ms noisy🤷‍♀️ (0.64d, 0.28p, 2.35std) +1.44%, 0.02s invariant (0.66d, 0.24p, 0.03std)

@SimonDanisch
Copy link
Member Author

Ah, this still fails (should fail), since it changes the limits for plots with only one point, e.g. text(Point2f(0,0); text="hi")

@SimonDanisch
Copy link
Member Author

Ok, i think this is the wrong approach!
Plot limits from e.g. text(Point2f(0,0); text="hi") already get expanded...
The question is, should we error in the limit setting code for dmin==dmax, or just also expand it, like its done for a plot with only one point?
Will close this PR for now, since a fix will look pretty different!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants