Skip to content

Comments

add interactive zoom inset#5456

Open
SimonDanisch wants to merge 13 commits intomasterfrom
sd/interactive-zoom-inset
Open

add interactive zoom inset#5456
SimonDanisch wants to merge 13 commits intomasterfrom
sd/interactive-zoom-inset

Conversation

@SimonDanisch
Copy link
Member

using GLMakie

fig = Figure()
ax = Axis(fig[1, 1], title="Interactive Zoom Inset Demo")

# Create some data
x = 1:100
y = sin.(x .* 0.1) .+ 0.5 .* cos.(x .* 0.3)
lines!(ax, x, y)

# Create an interactive zoom inset
# The rectangle defines the initial zoom region: Rect2f(x_origin, y_origin, width, height)
zi = zoom_inset!(ax, Rect2f(30, -0.5, 20, 1.5))
fig
2025-12-04.15-27-10.mp4

@github-project-automation github-project-automation bot moved this to Work in progress in PR review Dec 4, 2025
@MakieBot
Copy link
Collaborator

MakieBot commented Dec 4, 2025

Benchmark Results

SHA: 5e36ced38ded78d27331229e858347ec17ae885e

Warning

These results are subject to substantial noise because GitHub's CI runs on shared machines that are not ideally suited for benchmarking.

GLMakie
CairoMakie
WGLMakie

@ffreyer
Copy link
Collaborator

ffreyer commented Dec 11, 2025

Changes made:

  • inset axis now works with transformations (both transform functions and model transforms)
    • The inset axis also works with a different transform_func (xscale, yscale) than the parent Axis. So you can have a linear view into a log plot/axis. (This requires no model transformations. Bottom right in refimg does this with xscale = log10 in the parent axis.)
  • placement of the inset axis now dodges the zoom rect by default
  • the dotted lines now connect corresponding corners. These lines are picked to never overlap with either the zoom rect or the inset
  • added refimg test:
image

@ffreyer ffreyer mentioned this pull request Jan 3, 2026
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Work in progress

Development

Successfully merging this pull request may close these issues.

3 participants